I added this to functions.php while having Yoast SEO activated, and then it worked!
add_filter('wpseo_title', 'filter_product_wpseo_title');
function filter_product_wpseo_title($title) {
if( is_singular( 'my_post_type') ) {
$title = get_field("title_tag");
}
return $title;
}
Related Posts:
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Register a title automatically with a relationship field
- Change “Enter Title Here” help text on a custom post type
- Filter by custom field in custom post type on admin page
- Getting custom taxonomy from custom post type
- Media library – Limit images to custom post type
- Filter next_post_link() and previous_post_link() by meta_key?
- How do I get a post (page or CPT) ID from a title or slug?
- Limit the word count in the post title
- importing third party json feed as custom post type [closed]
- Is there a way to override the tag specified in header.php?
- how to get posts by custom post type then display Custom fields?
- How to correctly get post type in a the_title filter
- Filtering a WP_Query meta_query by numeric values isn’t working
- How to hook into the CPT’s title placeholder?
- Populate a ACF Select Dropdown from Custom Post Type
- Automatically fill custom field value on post publish/update
- title_save_pre on post publish
- Set Custom Post Type title to the Post’s Date
- Change title in head on Archive page
- How To Set Custom Post Type Title Without Supports
- WordPress custom taxonomy URL rewrite on spelling errors
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- Filter a custom field based on selection of another custom field (ACF) [closed]
- Set post title from two meta fields
- Make permalinks based on an ACF-field
- How I check if the same post slug has not been used before publishing?
- ACF Relationships in Custom Post Type Permalink
- WP Rest API Querying Custom Posts by ACF fields
- How to sort a table of custom posts by column containing custom field
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Best Way to Leverage Custom Post Type Related Content and Consider SEO
- Meta Query “IN” doesn’t work with ACF checkbox filter
- Custom Post Type with Custom Title
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- Setting a title on a Custom Post Type that doesn’t support titles
- List events by month
- Use Custom Post Type as Custom Field
- Count custom post types with a specific meta value
- Query by 2 values of a repeater ACF field
- Using a Custom Field instead of original title field but only for Custom Post Type
- Search Post Title Only [duplicate]
- dynamically update permalink and title with the values of custom fileds
- Insert slider (Custom Post Type) into pages
- get terms that have post with custom post type between 2 values
- get_page_by_title() not returning anything [closed]
- How to set custom post type as post title to avoid ‘Auto Draft’
- Custom Post Types: Custom columns with Title submenu?
- Pull image from ACF field in a Custom Post Type
- Archive filter disappears on no results?
- Query current and future events, ordered by begin date
- Show ACF field from custom taxonomy and display on the single template
- Change message given when deleting post from custom post type
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Display posts if a custom field value is equal to another custom field value
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Linking three taxonomies with ACF
- Posts created in a Custom Post Type are lost if published without a title
- Get Custom Field Values by Another Custom Field in WordPress
- What is the impact if i ignore title and content in my custom post types CPT?
- WordPress custom post type archive with description
- wp_update_post based function works on existing posts, but not new posts
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- Show custom field from custom taxanomy term on custom post type
- Get a permalink structure of /%posttype%/%category%/%postname%
- How to filter out post type meta?
- Query Custom Post Types by date (custom field) range
- Updating post title using wp_update_post
- How to replace custom post type slug with an ACF value?
- How to create an array for a CPT post ID to use in an IF/WHILE statement
- Link users to a custom post type
- Remove duplicated values from a loop
- Using several custom fields as custom post title
- “add_post_type_support” with Custom Post Type & ACF
- Custom Post type with ACF in REST API, how do I get those values?
- ACF simple text field value not showing
- Post Object Filter by Custom Field, not title (ACF)
- Custom Post Types not showing, custom WP_Query
- Rewrite WordPress URL to show CPT meta field data
- Create 3 Level Relations with ACF and WordPress
- Custom Post type and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- How to use the Display Name as the post title in a custom post type?
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Multiple ACF Repeaters within a Custom Post Type
- How to change post featured image using a custom field of category?
- Change custom post type slugs, with category/taxonomy before post type name
- Validate custom fields before save using WordPress Rest API
- get_posts of Custom Post Type AND Custom Taxonomy
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- Add acf field in title (admin table)
- Custom fields vs. Custom post types for a Portfolio Website
- Retrieve value of a category’s custom field
- How can I dynamically add a post to a custom post type which uses a custom field?
- Problem with WordPress query on page using custom fields
- the_content() not outputting anything (Advanced Custom Fields)
- How can I run this code once so that my generated post title doesn’t keep changing on publish/update?
- How to add a post slug to a url?
- Add custom ID to CPT posts only create not update
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?