Getting a specific “title for a section” only on Startpage?

I think perhaps what you want is either <?php if ( !is_front_page() ) : ?> <h2> <?php wp_reset_query(); ?> <?php echo $post->post_type; ?> </h2> <?php endif; ?> if you’ve done a custom front page that shows the blog posts, or <?php if ( !is_home() ) : ?> <h2> <?php wp_reset_query(); echo $post->post_type; ?> </h2> <?php … Read more

WordPress Title Tag Not Changing

The return function doesn’t require (). So you’d want your function to look like this: function wpse_set_document_title_separator ( $sep) { return ‘-‘; } add_filter( ‘document_title_separator’, ‘wpse_set_document_title_separator’ );

Custom post type split title, setup permalink accordingly

I have been working on this solution, I have come up with a different idea to implement this – I have added two different meta boxes, one with First Name, the other with Last Name Then I have hooked a function with save_post_{$post->post_type} hook like this – add_action( “save_post_{$post->post_type}”, “update_post_data” ); function update_post_data( $post_id ) … Read more

Custom Post-Rename Function Does Not Function in WordPress 6.x

The call to get_the_ID() possibly worked by happy coincidence of there being an available post object to pull the ID from. However, realistically you should have been looking at data available to the filter for this ID instead, here’s how. First update you add_filter declaration to bring in the second variable from wp_insert_post_data. add_filter( ‘wp_insert_post_data’ … Read more

Title displaying multiple times

The function wp_title() is supposed to be used to generate the text for the title tag: <head> <title><?php wp_title();?></title> … </head> but to display the current post title within the loop, you should instead use the the_title() function.

I have a problem with Home Page title

This is more of an SEO question than a WordPress one… Changes won’t happen until after Google re-crawls your site – that is, the next time a googlebot visits your site and updates their information about your site. Wait for the next time they do. The rate/timing for the next googlebot crawl varies by site

Show page name in browser

Your title is being set by something in your theme or a plugin attaching to the wp_title filter. You can further filter this value or override it entirely by using the same hook and a different priority that executes later. // add a filter at priority 999 so it will presumably run last add_filter( ‘wp_title’, … Read more