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:
- Second Loop Showing Only One Post on Single Post Page
- Get markup for post without loading into the template
- Jquery Slider for profile template
- Why do themes rely on “The Loop”?
- Is including the loop necessary for page.php? [duplicate]
- What is best way passing variables to theme templates and using them different places like widgets?
- include(locate_template) messing up the loop
- Page template not displaying
- Loop through pages with specific template
- How to get_template_part using AJAX?
- wp alchemy multiple image uploader output images to template
- code suddenly appearing from my tempate second loop
- Get search.php results in header.php?
- WordPress Loop inside Loop?
- Template structure
- How to show “teaser” posts on blog / archive pages, otherwise full posts
- Order archive results by post id in custom taxonomy template
- Default ‘post’ post type archive slug?
- How do I make a variable available inside partials?
- Update status of all posts in a category
- 404 Template customization | Want 10 recent Post on the 404.php error page apart from the error Notice
- How do I put my frontpage featured image in a page template for home.php?
- Call wp-blog-header.php header without performing a wp_query
- How to render the single post template with the post name?
- excerpt not showing up
- How to add a byline to all the pages?
- new custom theme – posts displaying on top of one another
- How do i create a list-posts-page?
- How to sort a loop after most viewed
- How to loop specific Category menu from archive page?
- How do I set the Stewart Search Template to return only published posts in the result
- Is it possible to set archive.php instead of index.php to display blog?
- Using is_page_template inside loop
- Trying to get property ‘post_content’ of non-object
- is it bad to copy the loop for a template?
- Is “the loop” a template tag?
- Deeply Nested Menu Loop with Twig using Timber [closed]
- WordPress with woocommerce custom query
- Infinite Loop after Genesis Theme Upgrade
- Alternative layout the loop
- Cant pull in featured Image
- Template included with plugin doesn’t return all posts for custom taxonomy
- Creating a archive for taxonomy terms, not the term results
- Default Template infinite loop of Title
- Secondary loop cuts off at 10 posts?
- Need a conditional to test if title of parent page matches title of child page
- get all page templates
- Load featured article once in a loop
- wordpress showing all posts instead of date range
- How to implement template file and the loop
- Same posts within a paginated page
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- How can I create an entirely new, separate display of posts?
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to override the “inc” folder (or any folder) in a theme using child theme?
- How can I get wp_head() as a string instead of echoing it?
- How can I custom order the results from wp_list_categories?
- When and Why is is_singular(‘my_cpt’) true while in_the_loop() is false?
- Display all authors and their only one latest post
- Getting page ID inside loop
- Setting hero/splash section as a blog post
- How to show just private posts in loop
- How to paginate this custom loop? [duplicate]
- Select data from database and list it in Loop (WordPress)
- Running a loop with a custom query string on a custom page template
- I’ve been out of the loop since 2.8. What did I miss?
- Loop first six posts in carousel, next eight in grid
- Infinite blog loop
- One custom loop with condition to check child posts
- Loop get_theme_mod
- How do I go about looping through a advanced custom field on a particular page inside of another page
- The Loop – mixed ASC and DESC order
- Filter the_posts doesn’t work on search page
- Calling the_excerpt from inside a plugin template file
- How to get the excerpt for is_home() outside of the loop isn’t working
- Custom loop ordering not working
- First archive page with a few posts
- Loop through ACF taxonomies and output associated posts
- How to get user ID’s from multiple usernames?
- Query posts only with actual text content (not including shortcode or images)
- Default featured image set as background image [closed]
- Breaking up the results of a loop
- Exclude posts based on an array
- Is file_exists() compatible with timthumb.php? [closed]
- Removing a widget via theme editor
- Archive: Lists itself
- How to show the last article in a different way in my blog?
- How to fix pagination for custom loops?
- Check to see if a field is within an array in twig
- Use special template for the first post in the loop
- Archive sorted by month – separate
- One page loop issue with posts
- Humanmade | Custom meta box class: How to display a repeatable meta box group?
- Get query result before posts are displayed?
- WordPress Group By Problem
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- Problem with ms-thumb-frame-selected class in Master Slider
- Creating mixture of shortcodes to use in the visual/text editor
- Add static image block to lastest list item
- Place the Featured image on a post, before the first via code