[Support request] CPT UI and Advanced Custom Fields

Home Forums Support [Support request] CPT UI and Advanced Custom Fields

Home Forums Support CPT UI and Advanced Custom Fields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #475546
    Peter

    Hi,
    I am trying to display a custom post type I have created using the two above mentioned plugins.

    But I am struggling a lot.

    What post-template should I use in order to display the custom post type?

    Can any of you please help me with a coding example for displaying single custom post types?

    My biggest problems are which template to use as a foundation for a new CPT temnplate and the proper coding notation for GP.

    I am using a child theme of GP.

    I have been reading a lot (the whole day) both on the Net’s many sites and pages about this and on GP’s support forums.

    Thank you very much in advance for any help.

    cheers

    Peter

    GeneratePress 2.0.2
    GP Premium 1.5.6
    #475767
    Tom
    Lead Developer
    Lead Developer

    Hi Peter,

    If you’re using a child theme, you can follow these naming structures to make templates specifically for your custom post type: https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-post-types

    Depending on what the CPTs are displaying, you could also create shortcodes, or use a plugin like WP Show Posts to display the content.

    #476188
    Peter

    Hi Tom,
    Thank you for your reply with links and suggestions.

    I did in fact manage to create a post template file for displaying single CPTs in the way I want it to be displayed – so that’s great!

    However, I am in no way convinced that I am following best practices and that’s why I asked for a more specific coding example of displaying both single CPTs and archives of CPTs – the best practice way… ๐Ÿ™‚

    Onwards and forwards, right?

    cheers

    Peter

    #476747
    Tom
    Lead Developer
    Lead Developer

    It’s hard to give an example when it comes to stuff like that, as the structure of the code changes completely depending on the content being added to it.

    Glad you got it working! ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.