I’m not sure how to get it via the title, but you can get it via the slug (which is often more useful in my experience) using this:
http://erikt.tumblr.com/post/278953342/get-a-wordpress-page-id-with-the-slug
Just change “$page” to “$post” if you want to return slugs for posts instead of pages.
G’luck!
Related Posts:
- Multiple Conditions for Child Page Title
- How to sanitize post title with commas
- change title separator
- Blog Title not showing up on main Blog page
- Replace text in the Title
- How come I get internal server error even with try catch for get_the_title in functions.php?
- Print title page in header of a specific page
- Show post title words one by one [closed]
- Generate page title tag from the content of H1
- How to edit specific title instead of all the title calls
- Using php to overwrite or replace title tag, while using yoast [closed]
- How to get page title with the page ID?
- How to get permalink and title from post ID?
- Two title tags in my header
- How can I add title attributes to next and previous post link functions?
- Changing title of a page dynamically from within a plugin
- Problem in wordpress with “-“
- order by second word in title?
- How to add subscript and superscript in WordPress page titles
- add_theme_support( ‘title-tag’ ) in conflict with custom titles function
- the_title filter applying to menu items
- Modify page title format (when using title-tag)
- Fill post titles from post content?
- Empty title on front page/Home
- REQUIRED: The theme must not used the tags. | REQUIRED: The theme must not call to wp_title()
- Changing “Enter title here” based on post format
- WordPress i18n-friendly preg_replace post title
- How to make a H1 different then the Title?
- How to set custom title of custom page template?
- How do I edit the tag without using the deprecated `wp_title()` function?
- Change Default Custom Fields Metabox Name
- Display post title on individual image attachment page
- Include category title in wp_title
- Automatically add title attribute to links in WordPress
- Possible to create a new post and have the Title and Slug automatically use the post’s ID?
- Get wp_title() from page ID into a variable
- How can i remove JUST the title tag from wp_head() function?
- Custom Post Type Title Placeholder [duplicate]
- Site title not showing. What can I do?
- Remove site name from tag
- posts order by title second word
- get the_title_attribute by id
- SEO meta description and title tag Yoast SEO
- What code do you use to generate the text to go into the HTML title tag?
- How come my first blog post and my home page have the same title?
- How to intercept Post Title on Post-Save
- Where do I change the ACTUAL title tag that is set in the header.php
- Why doesn’t YoastSEO allow me to set the title/description for the home page? [closed]
- Change title tag dynamically or within plugin?
- Get title of page from URL
- Filter get_the_title to remove certain characters?
- Remove site name from title post
- Hide price & title in store thumbnail dispay? [closed]
- Change all Post titles into [Title Case] format
- How to modify a title tag in genesis?
- How do I set the blog name?
- How to Change Title Attribute to be different from Page title
- Get widget Title from widget id
- Add anchor text to php
- How to echo a different title to the page if it’s opened on an android mobile phone
- Adding schema.org itemprop to WP4.1 Title Tag
- Remove post title
- Set max title length – similar to excerpt length for outside of single.php
- How to edit title on Edit post pages?
- How do I shorten the title lenghs with Elementor theme? [closed]
- Automatically add words if duplicate post titles
- Remove Title of youtube video
- WP action/filter to modify title before header output and article output?
- How to Customize “WordPress > Error” Text in Titlebar?
- How to insert icon in site title
- How to add H4 tag to the_content filter (after content)?
- How can I automatically insert the page content as the title?
- HeadSpace2 double title on homepage
- Changing title & add Breadcrumbs
- Page title is showing category name as well in the google search results
- How to Change The Title in WordPress For SEO
- Sanitize the output of the_title() or the_title_attribute() to remove whitespace
- Change page title dynamically before header is rendered
- Modify conditional titles to include parent and page number
- Why is a category/ tag name prefixed to title of every page?
- Where does Yoast SEO plugin sets the site/page title?
- How to output the title of the blogs home page
- For better digital journalism, how to store a second title and excerpt?
- After I set the title, it over-wrote all the titles for the individual pages
- Cannot use ‘CSS’ in post title
- Wrap the_title_attribute in a H2 within a Conditional Tag?
- How to echo all the_title() without text after last “-“
- set title attribute in wp_get_attachment_image()
- get_the_title outputs title until spacing; it does not get full length of title
- Title tags show twice
- Setting page title and keywords from PHP code
- Anyway to specify what should appear in in .php file?
- How to solve the site tag being displayed twice?
- How can I override the post title when a post is set to sticky? [closed]
- disallow publish posts with special title
- Print post title with markup
- How to get current page title inside a page’s template
- Permalink and ACF field
- Remove tagline from the HTML on the home page without plugin?
- Homepage meta title and description not showing in search engines?