• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Add a custom post type in a menu

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved
  • This topic has 7 replies, 2 voices, and was last updated 9 years, 5 months ago by chikamiku.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • October 12, 2013 at 2:15 am #66388
    chikamiku
    Participant

    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

    October 13, 2013 at 6:21 am #66493
    Brad Dalton
    Participant

    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.


    Tutorials for StudioPress Themes.

    October 13, 2013 at 6:43 am #66496
    chikamiku
    Participant

    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

    October 13, 2013 at 6:46 am #66497
    chikamiku
    Participant

    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

    October 13, 2013 at 6:59 am #66498
    Brad Dalton
    Participant

    You want an archive page template for your custom post types? http://www.carriedils.com/custom-post-type-archive-template/

    Or you could simple copy and paste all this code.http://wpsites.net/web-design/add-responsive-portfolio-page-to-lifestyle-pro/


    Tutorials for StudioPress Themes.

    October 13, 2013 at 4:32 pm #66544
    chikamiku
    Participant

    Hello Brad,

    Thank you again for the message. I got the following results after implementing both the links you sent me.
    http://www.halalfriendlyhotel.com/masajid/

    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. http://www.halalfriendlyhotel.com/hotels-2/

    Could you please guide me where am I making mistakes?

    Thanks and I hope to hear form you soon.

    Thanks

    October 13, 2013 at 10:15 pm #66576
    Brad Dalton
    Participant

    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.


    Tutorials for StudioPress Themes.

    October 22, 2013 at 3:12 pm #68283
    chikamiku
    Participant

    Brad,

    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',
    array(
    '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' ),
    )
    );
    }

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble