• Hello,
    i am trying to show subtitles under each excerpt title, but the subtitle gets duplicated.

    To achieve that, i have added this call before the last return statement of
    tonjoo_ecae_excerpt :

    show_subtitle("h3");
    

    This is the definition of show_subtitle:

    function show_subtitle($tag="h2"){
    			ob_start();
    
    			the_subtitle();
    			$subtitle = ob_get_contents();
    
    			ob_end_clean();
    echo '<' . $tag . ' class="subtitle">' . apply_filters('the_title',$subtitle) . '</' . $tag . '>';
    }	
    

    The subtitles get duplicated even if i replace show_subtitle(“h3”) with the_subtitle().
    Why is this?
    The post page https://saranda.holiday/vacation-tips-albania-saranda/ calls show_subtitle() but doesn’t have this issue, only the excerpt has it.

    Let me know ,
    thank you in advance

    P.S. The subtitles plugin i use is KIA Subtitle.

    • This topic was modified 6 years, 8 months ago by php-supadev.
    • This topic was modified 6 years, 8 months ago by php-supadev.
    • This topic was modified 6 years, 8 months ago by php-supadev.
    • This topic was modified 6 years, 8 months ago by php-supadev.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor ageproem

    (@ageproem)

    Hello lianobat,
    It seems that you try add subtitle via ECAE plugin. If you want to add subtitle, please add this via theme.
    edit file template-parts/content.php & template-parts/content-single.php

    Thread Starter php-supadev

    (@lbdeveloper)

    It worked thank you!
    I had to edit the files in the template-parts/widgets folder , as i was showing the excerpts via the Magazine widget

    • This reply was modified 6 years, 8 months ago by php-supadev.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Subtitles are duplicated in the excerpts’ is closed to new replies.