• gulliver

    (@gulliver)


    New to CPTs, I’ve an issue with the titles of some I’ve just created.

    My blog posts are within /notes/ and so the CPTs have ‘with_front’ => false’ for the slug.

    But the titles are prepended by ‘Notes:’ (using conditional page titles with ‘elseif (is_single())’).

    How do I remove that prepending text from the CPTs?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    The front is set in the wp-admin > Settings > Permalinks page.
    For example if you set the permalink custom structure to

    /my-blog/%postname%/

    The front is

    /my-blog

    The front is not the /notes/ part from the cpt permalinks.

    It’s not recommended to remove the /notes/ part from the slug, as it could conflict with normal posts and pages permalinks.

    Here is a way to do it:
    http://kellenmace.com/remove-custom-post-type-slug-from-permalinks/

    Thread Starter gulliver

    (@gulliver)

    Thanks.

    Having read a lot, I’m ok-ish with the slug/permalink thing (unless I missed something – quite likely)… I hadn’t explained clearly – the slug isn’t removed, but modified to a different url path which shouldn’t conflict.

    It was the title that was troubling me… but if I change the conditional to ‘elseif (is_singular(‘post’))’ things seem to be ok. (I hadn’t realized that ‘is single’ also applied to CPTs.)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘CPT titles.’ is closed to new replies.