• alessandronicotra

    (@alessandronicotra)


    I installed the plugin in WP and placed this code in the funtions.php file of the Genesis child theme:

    function my_wp_subtitle_page_part_support() {
    add_post_type_support( ‘my_post_type’, ‘wps_subtitle’ );
    }
    add_action( ‘init’, ‘my_wp_subtitle_page_part_support’ );

    do_action( ‘plugins/wp_subtitle/the_subtitle’, array(
    ‘before’ => ‘<p class=”subtitle”>’,
    ‘after’ => ‘</p>’,
    ‘post_id’ => get_the_ID(),
    ‘default_value’ => ”
    ) );

    Unfortunately subtitles do not appear in the Genesis themed version of the site while they are in place in the AMP version.
    Can you help me?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • How old is your Genesis theme? There were massive core changes some time ago.
    In an old Genesis theme it works like charm for pages & posts added via genesis_entry_header.

    add_filter( 'genesis_entry_header', 'genesischild_do_subtitle' );
    function genesischild_do_subtitle( ) {
    	$id = get_the_ID() !== '' ? get_the_ID() : false;
    	if (get_the_subtitle() !== '') {
    		echo get_the_subtitle($id,'<h2 class="subtitle">','</h2>',false);
        }
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Subtitle not shown on Genesis theme’ is closed to new replies.