Strange. Outside the loop, the_title() should give you the current page name, if you really are on a page, and not viewing a specific post. If it gives post title instead, it may mean that you are somehow inside a loop. But if that were true, wp_title shouldn’t show “Blog”.
See if other options give the same result:
//the_title();
single_post_title();
echo $post->post_name; // I think this shows the url page name
Also check for is_page().
You might try the is_page(‘Blog’) test.
if (is_page('blog')) {
echo 'Blog';
}
else {
the_title();
}
just to see what happens.
Related Posts:
- how to display full post with pagination on home page
- Static page does not show my posts
- Change modified date to current date when title updated automatically
- Post title not displaying as recorded in the wp_posts table
- long-title posts do not want published
- Please I want to prefix my WP posts title according to each category
- Hiding title of selected post without plugins
- Title displaying multiple times
- Single Post in Tab/Slider
- Blog post not showing title
- Getting Duplicate Posts on Home Page with Widget Added Between Posts
- How can I remove the first two words and shorten get_the_title()
- How do I include the category next to the title of a post?
- how to hide empty fields of post category description?
- How to style archive post titles… but only those posts who have comments?
- Replace image name on upload to the new post name on front-end form
- Edit the post title from the frontend
- Why in my query is display two title?
- Image behind the post’s title
- Change Post Title For Specific Category
- Add hero image to home page (blog format) via the dashboard
- Custom home page with full post for first one only
- Give posts a particular template based on the assigned category
- How to remove “» (title of post or page)”?
- Display Featured Posts Grid on Static Page (Gazette)
- Auto update post title and slug when post status is changed
- Split post title for styling
- how to handle the loop using filling bootstrap grid structure?
- Inserting an example of the last 3 post on to the homepage
- Get featured image on hover of post title [closed]
- I don’t want the complete article to show on homepage
- Microformats in a single post – layout conflict
- How do I display the post_title with get_permalink?
- Cant’ Grab WordPress Built-in Posts Through Loop
- Post is in descendant category not working in home.php
- Change default post style to columns
- Post titles and thumbnails as links to custom post types?
- links to posts not working on homepage
- When trying to set title, not sure how to edit it for different pages
- If post exists, make it a comment in existing post with same name?
- How do I allow certain users to make a certain type of post?
- How to add a post class on every post. (on homepage)
- I can’t find the relevant part of the loop in my theme file. How do I find the full content with “More…”
- how many visitor open this post? [closed]
- What’s a theme that properly handles previews of different types of posts?
- WordPress Architecture as a CMS – Posts & Pages
- Conditionally exclude post from specific category on home page sidebar?
- Am getting duplicate data from get_posts()
- Changing The Default Header POST Title and Description text by category in wordpress
- How to select a category automatically based on a word in WordPress post title?
- how to show current date on post title which should be auto update in every day
- Add a field in my rest api
- Permanently deleted posts still exist
- Adding Text after Post Title based on Category using IF Condition – But not for menu items
- How to merge the content of posts that have the same title?
- How to add first 3-4 post tags on WordPress Post Title
- created post displaying differently on front end
- “Blog pages show at most” in setting not working
- Why is WordPress showing a blank excerpt for just one of my posts?
- Aligning images in the wp editor not working. How do i get this to work in custom theme?
- How to pull latest posts from a specific category
- How to show only homepage in google results instead of privacy, contact pages
- Problem paginating a subquery on a post
- Include Recent Post in Category
- How to Make my Homepage Display a Single Specific Post?
- Make current post the homepage
- Create/Set Category as Title of Post
- Moved a website and excerpts don’t work for old posts
- Blog featured images disappeared on my homepage
- Blog images not showing on homepage
- How to prevent clicking on posts
- Add id attribute to h1 element of wordpress post
- How to get value of a selected option from select tag and use it in WP_query to filter posts?
- Post title spoiler how?
- Odd hyphen added at end of blog post
- My posts page is missing the page title
- 2 Domains, Same Content, Different Titles?
- Post Category link is same with Page link
- Integrate video and iframe in a post type gallery
- Display post on main page with thumbnail
- How to put the WordPress blog into theme
- Display post order ranking within wordpress loop
- Displaying a specific sub-category’s posts from wp_query
- Trim excerpt to first paragraph
- Posts only showing on /localhost/wordpress/ and not on other pages
- Hide title in Merlin Theme on posts and pages only
- How can I choose and change a post title at random from an array when it is published?
- Post are not showing up
- Post title to show all characters after having it limited for preview
- Display tab title as ‘blog tagline | blog title’
- double page title [duplicate]
- How to remove related post from home page
- Post as frontpage – avoid duplicate content
- Blog styling in SASS
- Link post to blog from a static page
- Add Image Before Posts Entry Title
- How to show the posts list into a static page? Problems to use the loop into a static page
- WP Load post with ajax and apply isotope
- 404 error on every post and page other than home
- prevent same wordpress post title