Skip Navigation

[Resolved] Add some extra labels to post type

This thread is resolved. Here is a description of the problem and solution.

Problem:

I would like to give the Archive title and my menu title/label in WordPress back-end a different value.

Solution:

There isn't such kind of feature within Types plugin, in your case it needs custom codes, for example:

https://toolset.com/forums/topic/add-some-extra-labels-to-post-type/#post-1132521

Relevant Documentation:

https://developer.wordpress.org/reference/hooks/get_the_archive_title/

This support ticket is created 6 years, 2 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 2 voices.

Last updated by jelle-jacobd 6 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1130411

Thanks that worked as well. Is it possible to add some extra labels? In some cases the label doesn't fit in. F.e. in some cases I need the label without a Capital or first letter in uppercase. If I change the standard labels the menu will also be completely written in lowercase.

Thanks again.

#1130413
labels.JPG

Hi,

Which label do you want to setup?
I assume you are using Types plugin to create the custom post type,
please edit your custom post type, in section "Labels", there you can setup the related labels manually.

See screenshot labels.JPG

#1131890

Thanks. I would like to create different label for the title and menu label in WooCommerce. Looks like there retrieving the same label field?

#1131897

Please elaborate the question with more details:
I would like to create different label for the title and menu label in WooCommerce

How and where do you want to create the labels?

You can take a screenshot for it, I need to test and check if it is possible within Toolset.

#1131899

Hi Luo,

Thanks for getting back at me. I would like to give the Archive title and my menu title/label in WordPress back-end a different value.

F.e.: Archive page title: Led verlichting kennisbank and Menu label: Kennisbank. At the moment the retrieving both the same field value as far as I can see. Correct?

#1132521

Thanks for the details,you are right, it is expected result, and there isn't such kind of feature within Types plugin, in your case it needs custom codes, for example, in wordpress built-in theme 2017, it is using function the_archive_title() to render archive title in front-end, so you can use filter hook "get_the_archive_title" to change the archive page title to what you want, for example:

function kennisbank_archive_title( $title ) {
    if ( $title ==  'Kennisbank') {
        $title = 'something else';
    }
    return $title;
}
 
add_filter( 'get_the_archive_title', 'kennisbank_archive_title' );

More help:
https://developer.wordpress.org/reference/hooks/get_the_archive_title/

#1132606
Schermafdruk 2018-10-23 12.55.03.png

Hi Luo,

Thanks. Before Toolset types I used CPTUI where this was standard functionality (screenshot). Maybe you could consider implementing this in the next update or so?

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/setup-different-archive-title-from-post-type-name/

#1133178

The new feature request ticket has been created here:
https://toolset.com/forums/topic/setup-different-archive-title-from-post-type-name/

Our developers will evaluate it, please follow up above ticket if there is anything missing.

#1136076

My issue is resolved now. Thank you!