I assume that you want to use propertysq
custom field/post meta in the title and you use Yoast SEO. ( Correct me if I’m wrong )
So, use this is your functions.php
function wpse239252_hook_title($title) {
global $post; // make sure the post object is available to us
if(is_singular()){ // check we're on a single post
$propertysq = get_post_meta(get_the_ID(), "propertysq", true);
if($propertysq != "") { //check if not empty
$title = $propertysq.' - '.$title;
}
}
return $title;
}
add_filter('wpseo_title', 'wpse239252_hook_title', 15, 1);
This will add propertysq
field to your title as 1,002Sq Mt - HS0525 - Chaweng Noi - Horizon Homes Koh Samui
in your given example, where propertysq = 1,002Sq Mt
.
P.S: To get post_meta propertysq, use $propertysq = get_post_meta(get_the_ID(), "propertysq", true);
Let me if it works for you.
Related Posts:
- Title and post URL based on custom fields?
- Split the_title
- How can I modify RSS item titles to be either the title or a custom meta field?
- Shortcode To Display Post Custom Field Value in Post Title, Post Content
- How to I make my post title link to a custom field
- Best way to achieve multiple links in a post title
- Move the post title to another field
- automatically add custom fields to post title
- Decouple page name from page title
- WP Query Args – search by meta_key or title
- Problem with serialized arrays in custom meta
- explode array within shortcode
- Can I count the number of users matching a value in a multiple value key?
- WP doesn’t show Array Custom Fields?
- How do I search an array stored in a custom-field using WP_Query?
- Plugin to auto convert custom fields to tag
- Order by Custom Field date not recognized
- Using Custom Function With Advanced Custom Fields
- custom field with total count of Facebook likes, comments and shares
- How to show custom field’s value under post/page title in wp-admin
- How do I read the value of a custom field of the page?
- Displaying additional User Contact Information
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- Making custom field’s ‘Name’ available in the dropdown list by default in a theme?
- Transition from (classical) serialized custom meta field to (gutenberg) rest enabled meta
- WooCommerce conditional required checkout fields [closed]
- Using more than one meta_key in pre_posts_query
- Way To Store Global Meta Values
- Orderby custom field meta value ASC and then by date DESC
- Sorting posts ordered by custom field value
- query usermeta from custom field
- Creating author profiles with extra fields and exporting that data?
- WP 3.1 meta_query for multiple custom field values
- Better way to save image in custom field
- Filter Posts on Custom Fields and Show them on a new Page
- Removing link ” from ” on meta_value in custom feilds
- Jetpack post types Portfolio or Testimonials support for custom fields?
- How to add a custom field in the advanced menu properties?
- Meta query with multiple custom fields for archives page ordering problem
- filter custom field values $min $max
- Select multiple images from custom field
- Custom Fields – How to create a list from multi-line entries of a single value
- Unique meta_key with array value vs repeated meta_key with single values
- Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)
- How do I use “if field exists” with $curauth?
- Run str_replace on title and save the output to a custom field
- custom field (video/audio url) and embed functionality
- Allow only one post with specific meta value
- Custom metabox not displaying multiselect data in edit mode
- How to validate select field in post meta?
- Querying posts by latitude and longitude to build a Google Maps with several markers
- How to display childrens custom fields?
- Attach images to posts using custom fields (just paths to images already uploaded)
- how to display custom fields of post on a web page
- How to fill custom fields with brackets in their key with add_post_meta()?
- How to use pre_get_posts to alter posts_per_page of category pages, where ‘posts_per_page’ will be dynamic
- Front-End User Profile
- Displaying pages with a specific custom meta
- How to update user profile custom fields
- How to print the Custom fields values [closed]
- How to validation for sanitize_URL?
- How can I output the custom fields wrapping with HTML
- put saved metabox values back into fields and then display on the front end
- How to get custom image field of specific post id
- Custom field to array?
- wp_get_attachment_image_src() with advanced custom fields returning empty
- How to update custom field of a posts in a particular category
- How to query posts by month based on date custom field?
- Change word in woocommerce product category custom field
- get posts based on non-single metadata
- Problem with revisions only returning four results
- Woocommerce products search with custom fields
- Convert author metadata to a custom field
- Add forms dynamically in admin pages?
- Custom pages or Custom Posts
- get_avatar filter is not working as per requirement
- Saving Custom Field that includes Quotation marks
- WordPress Admin – Automatically Sort Custom Posts by Custom Field Date Value in d-m-Y Fomat
- how can i show WordPress custom field data to my short code?
- how to execute custom field for structured data?
- Saving custom form data
- searching by keywords in post’s metas or pagination links problem
- Permanently show Custom Fields in Editor
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- Retrieve Google API JSON data and store as WordPress Custom Fields
- meta_query ‘compare’ => ‘!=’ not working
- Why WordPress takes time to make request to save post?
- Show comon custom field results?
- Display Data From This Custom Media Upload Meta Box?
- Display Child Page with custom fields within Parent Page
- Load code for custom fields only on admin pages?
- Pagination not displaying correct number of pages
- Show div based on custom meta value
- Show/Hide Featured Image or replace it with custom field [closed]
- Add fields to edit in custom widget
- Can running a WP-Cron to update_post_meta cause performance issues?
- custom field value is blank or empty
- How to add a custom field to the comments “Quick Edit” screen?
- Multiple triggers when publishing, saving or updating a post in WordPress
- If possible a field ID transfom in a Custom Field?