Add a custom post type in a menu

Community Forums Forums General Discussion Add a custom post type in a menu

This topic is: not resolved

This topic contains 7 replies, has 2 voices, and was last updated by  chikamiku 2 years, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #66388


    Just two questions please.

    How can I add a custom post type in a menu? Please explain the concept in a non-technical way.

    What URL should I use to link a custom post type to a banner image?

    Thanks and regards



    You mean you want to add a link to a single custom post type or archive custom post type?

    How did you create the custom post type? Can you link to it please.



    I created these custom post types by using a plugin called Custom Post Types UI. Creating a post type is perhaps not an issue. I am unable to to go to the next steps of actually displaying the post types properly in the top nav, and, in banners linking to images. on the homepage of the site or anywhere else.

    I perhaps know the answer would be in creating custom templates for the purpose. But which code to use. Any code examples would be great if possible.

    In the top nav, I want to link a post type showing all the posts in that post type. However, once I click on a certain post title, it should take me to that single post . This is some thing which regular posts already implement. But I do not know how to do it for custom post types.

    Thanks again for the quick response.

    Thanks and regards



    Is there any step-by-step tutorial explaining all these things in a genesis way? I got some clue for non-genesis themes. but I wanted to get info with reference to Genesis framework only.

    Thanks and regards



    You want an archive page template for your custom post types?

    Or you could simple copy and paste all this code.



    Hello Brad,

    Thank you again for the message. I got the following results after implementing both the links you sent me.

    The Masajid post type is showing up. However, I click on single post types as you can see the above.

    I used the second link you sent me to create the files the tutorial you asked me to follow and got the following result for hotels post type.

    Could you please guide me where am I making mistakes?

    Thanks and I hope to hear form you soon.




    Make sure you upload images which are exactly the same size as what the code uses and re-save your permalinks which will flush the re-write rules in your .htaccess.




    Thank you again. However, I am still struggling with this all. I thought I should try to create CPTs by adding few code lines instead of using a plugin. So I used the following code. I created a file called archive-trade-shows.php with the following code inside it. But with no luck.. Any clues on how to do that please.

    Thanks again.

    //* Add a custom post type
    add_action( ‘init’, ‘cd_post_type’ );
    function cd_post_type() {
    // Trade Shows custom post type
    register_post_type( ‘tradeshow’,
    ‘labels’ => array(
    ‘name’ => __( ‘Trade Shows’ ),
    ‘singular_name’ => __( ‘Trade Show’ ),
    ‘has_archive’ => true,
    ‘public’ => true,
    ‘show_ui’ => true, // defaults to true so don’t have to include
    ‘show_in_menu’ => true, // defaults to true so don’t have to include
    ‘rewrite’ => array( ‘slug’ => ‘portfolio’ ),
    ‘supports’ => array( ‘title’, ‘editor’, ‘genesis-seo’, ‘thumbnail’,’genesis-cpt-archives-settings’ ),

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.