{"id":416,"date":"2014-11-02T13:35:08","date_gmt":"2014-11-02T13:35:08","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=416"},"modified":"2023-03-20T01:26:19","modified_gmt":"2023-03-20T01:26:19","slug":"wordpress-title-empty-on-index-page","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/wordpress-title-empty-on-index-page\/","title":{"rendered":"WordPress Title Empty on Index Page"},"content":{"rendered":"<p>Here&#8217;s description from WordPress Codex about what happen when WordPress title empty when viewing index page\/ homepage<\/p>\n<blockquote><p>If you are using a custom homepage with custom loops and stuff or a custom front-page, you will have an empty wp_title.<\/p><\/blockquote>\n<p><!--more-->I recently encountered this problem on a client&#8217;s site. Homepage\/Index page is using a static page (WP Dashboard &gt; Settings &gt; Reading &gt; A Static Page &gt; Front page)<\/p>\n<p>Simple solution like this<\/p>\n<p>Using a conditional to display site title when viewing homepage<\/p>\n<pre><pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">&amp;lt;?php is_front_page()?bloginfo('name'):wp_title(''); &amp;nbsp;?&amp;gt;<\/pre>\n<p>Complete code like this<\/p>\n<pre><pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">&amp;lt;?php is_front_page()?bloginfo('name'):wp_title(''); wp_title(''); ?&amp;gt;<\/pre>\n<p>Post\/page outputs: Page Title<\/p>\n<p>Homepagd outputs: Site Name<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s description from WordPress Codex about what happen when WordPress title empty when viewing index page\/ homepage If you are using a custom homepage with custom loops and stuff or a custom front-page, you will have an empty wp_title.<\/p>\n","protected":false},"author":1,"featured_media":25,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[54,5],"tags":[6],"class_list":["post-416","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-snippet","category-wordpress","tag-wordpress-2"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-6I","jetpack-related-posts":[{"id":100,"url":"https:\/\/pixert.com\/blog\/wordpress-automatic-feed-links\/","url_meta":{"origin":416,"position":0},"title":"WordPress: Automatic Feed Links","author":"Pixel Insert \/ Pixert","date":"May 11, 2011","format":false,"excerpt":"WP themes usually have the following code in header.php [php] <link rel=\"alternate\" type=\"application\/rss+xml\" title=\"RSS 2.0\" href=\"<?php bloginfo('rss2_url'); ?>\" \/> <link rel=\"alternate\" type=\"text\/xml\" title=\"RSS .92\" href=\"<?php bloginfo('rss_url'); ?>\" \/> <link rel=\"alternate\" type=\"application\/atom+xml\" title=\"Atom 0.3\" href=\"<?php bloginfo('atom_url'); ?>\" \/ [\/php] Remove above when you are using the following code [php] add_theme_support('automatic-feed-links'); [\/php]\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":268,"url":"https:\/\/pixert.com\/blog\/wordpress-limit-post\/","url_meta":{"origin":416,"position":1},"title":"WordPress Limit Post","author":"Pixel Insert \/ Pixert","date":"November 30, 2012","format":false,"excerpt":"This function controls the maximum\u00a0amount of characters displayed for an entry on the main page. If the set limit is surpassed, the text on the entry will be chopped\u00a0to that amount of characters, otherwise the content will be showed unchanged. Add following code to functions.php in your theme folder [php]\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":222,"url":"https:\/\/pixert.com\/blog\/wpzoom-featured-category-widget-videozoom\/","url_meta":{"origin":416,"position":2},"title":"WPZoom Featured Category Widget with video for Videozoom theme","author":"Pixel Insert \/ Pixert","date":"April 6, 2012","format":false,"excerpt":"I made the following widget code to show Featured Category with Video embed code. The following widget works with Videozoom theme from WPZoom Open wpzoom-widgets.php in the functions folder of Videozom. \u00a0Add the following code at the bottom of the wpzoom-widgets.php [php] \/*---------------------------------------------*\/ \/* WPZOOM: Featured Category widget with Video\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":191,"url":"https:\/\/pixert.com\/blog\/how-to-add-pinterest-pin-it-to-wordpress\/","url_meta":{"origin":416,"position":3},"title":"How to Add Pinterest &#8220;Pin It&#8221; to WordPress","author":"Pixel Insert \/ Pixert","date":"February 14, 2012","format":false,"excerpt":"Pinterest is a vision board-styled social photo sharing website and app where users can create and manage theme-based image collections. Users of Pinterest curate themed image boards, populating them with media found online using the \"Pin It\" button, or uploaded from their computer. Each such item of media is known\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":87,"url":"https:\/\/pixert.com\/blog\/share-wordpress-posts-or-pages-via-email-link\/","url_meta":{"origin":416,"position":4},"title":"Share WordPress Posts or Pages via Email link","author":"Pixel Insert \/ Pixert","date":"April 28, 2011","format":false,"excerpt":"A simple link that open users default email client to send that WordPress Post or Page as an email to a friend or colleague. It displays an excerpt in the email body [php] <a href=\"mailto:type email address here?subject=I wanted to share this post with you from <?php bloginfo('name'); ?>&body=<?php the_title('','',true);\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":393,"url":"https:\/\/pixert.com\/blog\/add-facebook-like-box-change-language-local\/","url_meta":{"origin":416,"position":5},"title":"How to add Facebook Like Box and change language to local","author":"Pixel Insert \/ Pixert","date":"September 21, 2014","format":false,"excerpt":"Facebook Like Box\u00a0allows website owners to provide their visitors with an easy way to join their facebook community and get updates right in their Facebook news feed with a click to like from\u00a0their website. It\u00a0is\u00a0a good\u00a0way\u00a0to promote a \u00a0Facebook Page. Facebook Like Box only works for Facebook Pages, this isn't\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/09\/facebooklikebox.jpg?fit=447%2C547&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=416"}],"version-history":[{"count":1,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/416\/revisions"}],"predecessor-version":[{"id":631,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/416\/revisions\/631"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/25"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}