Do Hook for WordPress, but it changes some other value on the page that vytjagivanija function
the_title();
How to get and change only the
the_title()
which
<h6 class="post_title"><?php the_title(); ?></h6>
PS the Task is to change
the_title()
of a specific post. However, to navigate, ETA function using the same. When doing Hook to change the post to function
the_title()
( which minimalise the title of the post ), then the entire menu takes on a value that can be placed in place of
the_title()
post ( as TAA in the title menu of pages as well poluchaetsya funkier
the_title()
).
My Hook:
add_filter('the_title','add_h1_on_page');
add_h1_on_page function($title){
$seo_post_type = woo_com_check();
if(!empty($seo_post_type)){
return get_post_meta($seo_post_type->ID,'timworld_seo_h1', true);
}
return $title;
}
A piece of code which is the name of the post:
<div class="slider_data">
<a href ...>...</a>
<h6 class="post_title"><?php the_title(); ?></h6>
</div>
{
$seo_post_type = woo_com_check();
if(!empty($seo_post_type)){
return get_post_meta($seo_post_type->ID,'timworld_seo_h1', true);
}
return the_title();
}
in the template - cleve_Murray commented on July 9th 19 at 10:35