Skip Navigation

[Gelöst] Using Genesis SEO settings in Custom Post Type

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
How to use the Genesis SEO settings with Types Custom Post Types?

Solution:
You can use the Genesis API for this, as it's not a toolset related problem

This here will add the Custom Post type created with Types to the genesis SEO:

add_post_type_support( 'cpt-slug', 'genesis-seo' )

Replace

cpt-slug

with the slug of your post type where to you want to add Genesis SEO.

This support ticket is created vor 7 Jahre, 3 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 Antworten, has 2 Stimmen.

Last updated by PetrV1508 vor 7 Jahre, 2 Monate.

Assisted by: Beda.

Author
Artikel
#481996
Genesis-SEO-Settings.png

I would like to use standard Genesis feature for Pages and Posts - SEO Settings. I would like to have possibilty to edit Document Title, Meta Description and others with CPT.
How to insert this feature into editing window of CPT?

#482227

If the Theme hooks those features only into WordPress native Posts, I do not see any method to pass them into Types Custom Posts.

Maybe genesis has a function that we can hook to the Types CPT filters, but I do not know this as we do not produce Genesis.

Maybe Genesis has a setting where to include those features so you can choose what post types to apply it to?

#482251

I have found this in Genesis forum:

"If you want the genesis_post_meta filter to work with CPTs, you have to inlcude

add_post_type_support( 'cpt', 'genesis-entry-meta-after-content' )

somewhere during the init process. Change 'cpt' to the slug o your post type."

Is that what should I do? Where to include it?

#482258

In your functions.php file.

[php]cpt[php] has to be replaced with the Slug of the Types Post Type.

That should then add the Genesis Feature to the Types Post Type.

#482261

Great, thank you.

#482341

for others: the right code is

add_post_type_support( 'cpt-slug', 'genesis-seo' )

Change 'cpt-slug' to the slug of your post type.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.