Thank you again for all your help on this. I wanted slightly more control over the links I include in each accordion so in the end I stumbled on a different method to achieve the automation aspect by using shortcodes in the function.php. I will post below in case anybody else is trying to achieve the same.
The part I am struggling with which I hope you can help is the next page review date. I want it to be automated to two years after the last modified date. I can’t seem to get the Y to be +2. I am not sure what the code is, are you able to advise?
// Page NEXT Review date Shortcode for the content pages.
// =============================================================================
//
function nextreviewed_func( $atts ){
return '<b>Next Review:</b> <span style="color: #0a4d80;">' . esc_html( get_the_modified_date( 'M Y' ) ) . '</span> ';
}
add_shortcode( 'nextreviewed', 'nextreviewed_func' );
For anyone interested in the shortcode for the last reviewed date just add [lastreviewed] into your page and the following into your functions.php
// Page Last Reviewed Shortcode for the content pages.
// =============================================================================
//
function lastreviewed_func( $atts ){
return '<b>Last Checked:</b> <span style="color: #0a4d80;">' . esc_html( get_the_modified_date() ) . '</span> ';
}
add_shortcode( 'lastreviewed', 'lastreviewed_func' );
// Disclaimer Shortcode for the content pages.
// =============================================================================
//
function disclaimer_func( $atts ){
return "<b>Disclaimer:</b> <<< INSERT DISCLAIMER TEXT HERE >>>.";
}
add_shortcode( 'disclaimer', 'disclaimer_func' );