Tagged: title-tag
- This topic has 10 replies, 2 voices, and was last updated 5 years, 2 months ago by Alberto.
-
AuthorPosts
-
January 19, 2019 at 6:24 am #59735AlbertoParticipant
In head I put personal title tag, but in source code show double title tag because there is also this. How can I remove it? (Only for the home page)
<?php wp_head(); ?>
January 20, 2019 at 12:33 pm #59775Theme Horse Support TeamKeymasterHi,
You can simply add below code to remove it only from the home page.
<?php if ( !is_front_page() ) { wp_head(); } ?>
Thank you for using our theme.
January 20, 2019 at 2:20 pm #59786AlbertoParticipantSo it does not show the home correctly
January 21, 2019 at 6:35 am #59794Theme Horse Support TeamKeymasterHello Alberti,
Yes those code will not shows the title on your homepage (front-page).
Thank you!
January 21, 2019 at 9:15 am #59798AlbertoParticipantI’ll explain it better. In the home does not show the theme.
January 24, 2019 at 1:40 pm #59956Theme Horse Support TeamKeymasterSorry! Alberto We are not understanding what you are trying to achieve.
Can you please clarify one more time. So that we can help you.Thank you!
January 24, 2019 at 1:45 pm #59957AlbertoParticipantYour code hides the automatic title tag on the home page (in the source code), but it does not show the wp_portfolio theme, it shows the homepage as text without color, without formatting
January 24, 2019 at 11:44 pm #59964AlbertoParticipantJanuary 27, 2019 at 3:09 am #59990AlbertoParticipantI solved it so, in the file functions.php child I put this code that reverses the sequence: now it shows the motto and then the title of the blog, this is important for SEO
add_filter( 'pre_get_document_title', function( $title ) { if ( is_home() || is_front_page() ) { $title = get_bloginfo( 'description' ) .' | '.get_bloginfo( 'name' ); } return $title; } );
January 30, 2019 at 11:18 am #60041Theme Horse Support TeamKeymasterGreat to hear that you solve the problem. If you have any problem do not hesitate to contact us.
Thank you!
January 31, 2019 at 4:37 am #60055AlbertoParticipantI solved but not completely. In the page source shows correct, but in google search it’s not good. You can see.
add_filter( 'pre_get_document_title', function( $title ) { if ( is_home() || is_front_page() ) { $title = get_bloginfo( 'description' ) .' - Portfolio | '. get_bloginfo( 'name' ); } return $title; } );
-
AuthorPosts
- You must be logged in to reply to this topic.