I want to add number after post tittle for each category

Here’s an untested edit of your code to use the post’s first category in the count: add_action(‘the_title’, ‘dk_auto_numbering’); function dk_auto_numbering($title) { $post_ID = get_the_ID(); $the_post = get_post($post_ID); $date = $the_post->post_date; $maintitle = $the_post->post_title; if ($maintitle == $title && $the_post->post_status == ‘publish’ && $the_post->post_type == ‘post’ && in_the_loop()) { $categories = get_the_category($post_ID); if (is_array($categories) && count($categories) … Read more

Posts title instead of Pages and Category titles – PHP WordPress

How about extending the if statement to include the pages you require? Your code would look something like this: <?php if( is_front_page() ) { ?> <div class=”bloc-header-home”> <span class=”decouvrez”>Découvrez</span> <h1>La chasse en licence</h1> <span class=”avantages”>La chasse est partie prenante de la gestion durable des forêts, car elle contribue à la conservation des écosystèmes forestiers et … Read more

how to change the title of tag page?

You can use the get_the_archive_title filter, such as: add_filter(‘get_the_archive_title’, function($title) { if(is_tag()) { /* logic to set $title to what you want */ } return $title; }); Take a look at get_the_archive_title() reference for more information on how to use this filter.