In order to post, you must be logged in and have a membership.

Home Forums Course Discussions Blog Archive Page : Page Title Name

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #2590
      Mazhar Khan
      Participant

      Hi,
      URL: https://thekidneyexperts.com/blog/

      Issue: For some reason The Page Title Name showing the name First blog post title instead of the Page title ie 'Blog'.
      I have created a Page with the title name 'Blog' and assigned it to a template with the option Other -> Blog Posts Index.
      And assigned this page to WordPress Settings -> Reading -> Post Page = Blog.
      Thank You
      Maz

    • #2591
      Soph Simmonds
      Moderator

      Hi Mazhar,

      > For some reason The Page Title Name showing the name First blog post title

      It sounds as though you've used Insert Data > Title, which will retrieve post titles only (this is most likely why you're seeing the title of the first post). Please try using Insert Data > Archive Title instead.

      If you find that shows "Archive: Blog" or something similar, you can add the following code to the Code Snippets plugin to remove the text "Archive: ":

      add_filter( 'get_the_archive_title', function ($title) {    
      	if ( is_category() ) {    
      		$title = single_cat_title( '', false );    
      	} elseif ( is_tag() ) {    
      		$title = single_tag_title( '', false );    
      	} elseif ( is_author() ) {    
      		$title = '<span class="vcard">' . get_the_author() . '</span>' ;    
      	} elseif ( is_tax() ) { //for custom post types
      		$title = sprintf( __( '%1$s' ), single_term_title( '', false ) );
      	} elseif (is_post_type_archive()) {
      		$title = post_type_archive_title( '', false );
      	}
      	return $title;    
      });
      

      I hope this helps!

    • #2592
      Mazhar Khan
      Participant

      Hi Soph!

      Thank you for your reply.

      The Blog Archive page's template is Inherited from the Main Template ( In main template the Data-Insert is Title). I cannot change that to Archive template it will mess up the title of all the pages on the website.

      Is there any other solution?

      Thank you

    • #2596
      Soph Simmonds
      Moderator

      Hi Mazhar,

      I'd suggest opening a Support Ticket with the Oxygen team - I imagine they will be able to recommend something using Oxygen's Conditions feature once they can take a look at your site.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
menu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram