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]
- html5-reset theme does not show the image [closed]
- Managing WordPress Theme
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- featured content: which area does this cover [closed]
- Why in my theme I can’t see all the statics content under the posts?
- Broken theme, template is missing
- WordPress page/blog incorporated into static website
- Theme Customizer not displaying saved values in wp_head (CSS)
- Random white space before doctype
- Adding a gallery to my first theme
- Are seven additional image sizes are too many?
- What are the critical theme files when building a custom theme?
- Having issue with WordPress wp_enqueue_style
- How can I prevent posts with no title showing up in my query?
- Starting point for custom Themes [closed]
- How can I hard code my sidebar?
- What exactly is “wordpress theming”? [closed]
- Simple child theme modification but links are broken
- Theme Development -> Specific Homepage
- Making a WordPress theme based on twentyten
- Thesis -style Navigation
- registering a global template wordpress 6.0
- Post and page content not displaying in search results
- How can I wrap all blog posts image with
- theme style is applied on the dhasboard rather than the website
- Copying the theme style files and images to duplicate the website but with a difference
- Previous and Next links not populating, have I missed something?
- I have WordPress setup on primary domain, how do I set it up on its subdomain using the same database?
- Second Loop Showing Only One Post on Single Post Page
- Which cache is kicking
- 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]
- Alignment Problem [closed]
- What $handle does WordPress use for a theme’s implicit style.css?
- searchform.php doesn’t work properly
- Issue when posting updates/changes to wordress
- Twenty Seventeen Pages Loop
- Assign a template to a custom post type when displayed by the main loop on the home page
- Customizer: get_preview_url() inside customize_save_after hook
- How to add custom meta box when you have a custom page template file
- Password protect a custom template
- Valid SQL query not returning results
- How to track a users last visited page?
- Templates dropdown not appearing using _s theme (underscores)
- get_header action not working
- Shortcode call not working in WP Template
- In a Gallery with limited image posts, how do I not limit images on single post?
- Shortcodes do not work in own template
- Adding Bootstrap to WordPress TwentySixteen Theme
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- LESS not working in WordPress [closed]
- StoreFront WordPress theme: How can i create a new Home page with Custom design same as template [closed]
- Load different single.php templates according to post layout selection
- How do I include a partial from a directory below a wordpress theme directory?
- Is there a way to switch to another theme?
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- How does the loop know which post to view?
- New to WordPress – Read the Codex, Other Docs; Still Confused
- How add built-in textarea in theme development?
- Unwanted empty line at the beginning of document
- How to add custom page elements to the WYSIWYG editor?
- Why is my container argument not working for wp_nav_menu() [closed]
- Confused by the behaviour of “front page” / “home” templates
- Remove h1 from 2015 theme
- Never actually adding the action? Or do I have to call the action?
- WordPress pulling in random page themes
- I need to develop a one-page design
- Get markup for post without loading into the template
- best practices for updating wordpress theme