This will display the title of the page when a static page is set to show posts.
E.g.
I show posts on my homepage…
It’ll do nothing.
If I, say, show posts on page titled News…
It’ll show News in H1.
This is used so that the title of the page is shown, whenever posts are shown on a page, but nothing when blog posts are shown on the front page (home page).
We do it because if it’s on home page… it will show the title of the first post, making it appear twice (once at the top in H1 and again when posts are looped through).
Related Posts:
- How to insert a logo in the header?
- Page template in two level deep folder
- How can I get wp_head() as a string instead of echoing it?
- Grab the first paragraph of each post
- Single Page WordPress Theme – Using page templates
- First post of each category
- Returning Variables back into a template
- Setting hero/splash section as a blog post
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Finding Page Template and Displaying Content
- Some doubts about how to show posts in a custom theme?
- create-guten-block in wordpress theme?
- Override template file i subfolders
- Single Page theme [closed]
- Echo all category names, apart from one
- how to get the post attachement image in full size?
- How do I get the trackback count of a post in wordpress without writing an SQL query?
- Template for landing pages
- Change image size depending on page
- How to add menù section to my WordPress template?
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- Why still output /wp-content/themes/twentynineteen?
- Create theme for mobile phones and tablets only?
- first excerpt fine, subsequent post excerpts shift to the right instead of displaying vertically [closed]
- List categories of a post hierarchically?
- Local variable name in setup_postdata()
- How get the 10 most viewed pages (not post)
- How to close open divs in post loop
- Why am I getting posts back when I shouldnt
- What is the point of using the front-page.php template? [closed]
- How to add custom css file in theme?
- What’s the difference between home.php and index.php?
- get_template_part vs action hooks in themes
- How to remove search bar from a wordpress theme? [closed]
- Get url of thumbnail from the media uploader
- Template for individual post designs
- Add a preview to a WordPress Control Panel
- Pushing updates to your premium theme
- Where can I find a good reviewed collection of Twenty Ten child themes?
- Front End Post Submit Form
- Change loop order via form or link (jquery, not URL)
- CSS in child theme not overriding the parent theme [closed]
- Advantages of using instead of wp_enqueue_style()?
- Displaying wp menus by name without using theme locations
- How to add dynamic inline style?
- Optimal solution to develop a wordpress theme?
- How to add suggest plugin to theme?
- Why does this loop only work on the homepage?
- Prevent update check for specific theme
- Do I really need the div class entry?
- Am I supposed to create a child theme for every theme I use?
- using wordpress without javascript
- Theme Check: Could not find post_class
- Why wp_head() function not loading style.css?
- Override theme programmatically
- Set multiple templates per post
- WP 3.1 upgrade breaks AutoFocus+ theme
- How can I display/hide certain content based on a Theme Option field?
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- Displaying recent post excerpts on static front page
- Theme Splash Image within the “Appearance -> Themes” control panel [duplicate]
- Theme Loading Into Dashboard
- How to make theme elements customizable in wordpress?
- How to add “Template” option in page attributes panel?
- How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?
- Which html elements should be styled in wordpress theme
- Custom get_the_excerpt() only works on first post
- Admin: sub menu doesnt display under apperance when activate my themes
- Create a child theme from multiple themes
- Are seven additional image sizes are too many?
- registering a global template wordpress 6.0
- Copying the theme style files and images to duplicate the website but with a difference
- I have WordPress setup on primary domain, how do I set it up on its subdomain using the same database?
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- home.php show blog posts as grid view
- Theme Action to hook for one time only function [duplicate]
- Assign a template to a custom post type when displayed by the main loop on the home page
- HTTP Error when uploading images over specific dimensions
- Why is the `if else` not working?
- iPad WordPress theme?
- custom Background not showing after upgrade?
- Rolling your own WordPress Themes
- PHP Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE), expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) on line 124
- How to display home page last modified date in anywhere of wordpress theme?
- Loop is breaking my theme. How can I fix?
- Is a multipurpose theme an alternative to modifying or creating a theme from scratch?
- WooCommerce – edit templates
- How to dowload and edit content of a website
- Display content on Single page
- Best strategy for providing theme options using customizer
- How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?
- WP Knowledge Base Theme bug – Subcategories and Articles, Need to change WP_Query
- Trouble creating custom sanitization function when uploading video files
- What’s the policy for building a theme that doesn’t support widgets/menus?
- How Does One Create a Global Variable Repository
- Not Found when using activity stream as front page with BuddyPress
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- getting id of page
- Is there any open source WordPress Themes?
- Theme template file for a specific custom taxonomy