Support » Plugin: Related » Change Title Header

  • Resolved zshah512

    (@zshah512)


    Hi,

    Is there anyway to change the header of the title (Related Posts) to H4? By default, its and H3.

    Thanks!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi, currently that is not possible.
    I will see if I can change the filter to include the heading.

    Plugin Author Marcel Pol

    (@mpol)

    Does this code work for you?

    function my_related_content_title( $title ) {
    	// $entries_html is a string
    	$old = 'h3';
    	$new = 'h4';
    	$title = str_replace( $old, $new, $title );
    	return $title;
    }
    add_filter( 'related_content_title', 'my_related_content_title', 10, 1 );
    
    zshah512

    (@zshah512)

    Hi,

    Unfortunately, I’m not a programmer. Where should I insert this piece of code?

    Thanks

    Plugin Author Marcel Pol

    (@mpol)

    It could go into the functions.php of your theme.

    If you have a downloaded theme that gives you updates, you will need to create a child theme, before changing it. Otherwise updates will overwrite this code.

    zshah512

    (@zshah512)

    Got it. Thanks for that!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change Title Header’ is closed to new replies.