I think you’re muddling up the Template Hierarchy, so make sure to start by reading that.
page-blog-page.php
is for a page with the slug “blog-page.” If you’re using a page template, then you should name it something outside of the template hierarchy-reserved name spaces (e.g. page-{slug}
, etc.) such as template-swapnesh.php
.
Also, WordPress has the blog page specifically built into the template hierarchy: home.php
. You should be using that instead of page-blog-page.php
. As you’ll see in the template hierarchy graphic, the “Posts Page” never looks for a custom page template, it goes straight to home.php
and falls back to index.php
.
Related Posts:
- Custom templates not showing up in template dropdown
- Limit number of pages that use a specific template?
- What’s the most minimal way in which a page can be hooked into WP?
- How to dynamically save a selected option from page “Templates” selectbox?
- How do I pass data from page content to the underlying PHP template
- the_content of template page
- Create page template with some static contents
- Use same page-mypage.php template for several pages
- Avoid pages losing template association on site re-deploy
- WordPress blog posts template bug [closed]
- Adding styles/scripts to specific page
- WordPress form submit to custom page template does not work
- How do you assign custom template for Posts page (under Front page displays setting)
- Avada Theme – Display results from a specific category [closed]
- how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen
- Load new Posts on Scroll on Page
- May I know where to edit the tax rate?
- Get page id by template
- Change page template programmatically ?
- Conditional tag to check if ‘page.php’ is being used?
- A check for if is parent page, if has children, if has grandchildren
- Listing pages which uses specific template [duplicate]
- Is there a way to change the default page template selection?
- Hide page visual editor if certain template is selected?
- WordPress page edit does not save selected template
- Create pages automatically if they don’t exist
- Is it possible to manipulate the list of page templates?
- Set page template automatically based on parent
- Editing Complex Pages in Visual Mode
- Creating a template using a specific slug name, for a page with a parent page
- Is there a default template file for child pages / subpages?
- Create built-in pages without creating actual pages
- How to display code if it is not certain pages?
- Change admin startpage to Pages-page?
- Multiple areas of dynamic content in a page
- How do I set and list page_template with wpcli?
- How do I modify this page template to show subpage excerpts (not post excerpts)?
- Different fields in My Profile page depending on user role
- How to inject custom url path for page ?
- Dynamically Load Styles and Scripts from Theme Functions.php
- Is including the loop necessary for page.php? [duplicate]
- Hide page visual editor if template is selected – redux
- page_template toggle between 2 templates + 2 permalinks for same post
- Add custom admin menu item for pages using a certain template
- Custom Page Template [closed]
- WP is not using the select custom template.php that its selected for a page
- Is it possible to set a page template on a dynamic home page (articles list)?
- Page template gives ‘Parse error: syntax error’ when used, but no error found!
- more tag in the $post->content when get_pages were used
- how to show all post in my page-grid.php template page
- Different “Text Widgets” in Sidebar on Many Different Pages?
- Associate Page with User
- Selecting An image from the Media LIbrary on the frontend
- Why is custom template not seen as page with is_page()?
- Page with page template not using template in Preview
- How do I create multiple page while active a theme
- How to make certain page templates visible to admin only
- Static files or dynamic WP pages for “static content”?
- Can I apply a WP theme to a specific custom page template?
- CMS: Making complex pages editable by the end user
- Template for child pages / subpages
- Remove specific page/post from feed
- Subpage template
- Include a specific page in your template
- How to add meta boxes to Pages
- Where can I access my custom page template?
- How do I create a separate page for each author?
- Display a specific dynamic sidebar widgets on a specific page
- For custom templates, is it better to use `template_include` or `type_template`?
- Custom Template 404 for specific custom post type
- Dynamically change page that loads
- Password Protected Page Title
- How do i change page template in bulk?
- Load specific page template based on URI
- I have index.php and other files, how do I display other pages?
- is_home() returns TRUE on page template
- Removing the TinyMCE editor for a given page template
- Determine page content based on page parent
- Displaying page content in category archive (archive.php)
- Getting pages filtered by template assigned
- Using Pages to handle calls for custom post types
- Missing ‘Page Attributes’ in page edit
- How to get custom page template being edited in gutenberg editor
- How to make tag post listing page working?
- custom meta box for page default template
- Custom page template with entirely different design. Is it possible in?
- Best practice – pages – ACF or inline coding
- Move default page templates to sub directory
- How to make my category archive behave like a page
- Page template no longer exists – metaboxes won’t save
- Page attributes missing
- How to hook up search results page to a back-end page?
- page-name.php doesn’t execute on custom template
- Could be a namespace conflict (?) with login form and register form on the same page
- Custom page template for multiple pages
- My custom template page not loading content inside it?
- Remove Content edit box from ALL pages (not posts)
- How to detect if is_404() or is_page() or etc…? [closed]
- Changing permalink name redirects to another template?
- How To Load an HTML File As A WordPress Page (With No 301/No Redirect)