[Resolved] Custom post type

Home Forums Support [Resolved] Custom post type

Home Forums Support Custom post type

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #376226
    _blank

    Hi guys

    I’m using a custom post type to display a portfolio or work. This is separate to normal blog index.

    You can see an example here.
    http://be2.mackiedesigncompany.com/wp/work_slug/project-12/

    My client would like to add some navigation. Similar the the bottom of the post seen here:
    http://be2.mackiedesigncompany.com/wp/february/

    Do you know how I might do that?

    Thanks
    Scott

    #376257
    Jamal

    Hi

    I got the snippet below from the forum sometime back. Just replace “kundcase” with your custom post type

    //Add pagination to custom post type
    add_action( 'generate_after_entry_content', 'jam_custom_post_type_post_nav' );
    function jam_custom_post_type_post_nav() {
    	if ( 'kundcase' == get_post_type() ) : ?>
    		<footer class="entry-meta">
    			<?php generate_entry_meta(); ?>
    			<?php if ( is_single() ) generate_content_nav( 'nav-below' ); ?>
    		</footer><!-- .entry-meta -->
    	<?php endif;
    }
    #376732
    _blank

    Hey thanks Jamal, I’ll give it a go.
    Regards
    Scott

    #376756
    _blank

    Awesome that worked! Cheers Jamal.
    Scott

    #376762
    _blank

    Hi Tom

    Is there a way to either remove “folder icon & Work” from the custom post and just have the nav to previous projects.
    http://be2.mackiedesigncompany.com/wp/work_slug/project-12/

    Or What is the best way for me to customise the page for the work category? I just want to remove the side panel as this is part of the news section.

    http://be2.mackiedesigncompany.com/wp/category/work/

    Thanks
    Scott

    #376849
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try this:

    add_action( 'after_setup_theme', 'tu_remove_cpt_cats' );
    function tu_remove_cpt_cats() {
        if ( 'your_post_type' == get_post_type() ) {
            add_filter( 'generate_show_categories', '__return_false' );
        }
    }

    Just update your_post_type to the name of your CPT ๐Ÿ™‚

    #376850
    _blank

    Hi Tom

    Do I add this to snippets?

    Thanks
    Scott

    #376852
    Tom
    Lead Developer
    Lead Developer

    Ah sorry, yes ๐Ÿ™‚

    #376855
    _blank

    Thanks Tom,

    I’ve tried it here, but still have the “work” category.

    http://be3.mackiedesigncompany.com/wp/work_slug/landmark-wholesale/

    This is what I have in snippets.

    add_action( ‘after_setup_theme’, ‘tu_remove_cpt_cats’ );
    function tu_remove_cpt_cats() {
    if ( ‘work_slug’ == get_post_type() ) {
    add_filter( ‘generate_show_categories’, ‘__return_false’ );
    }
    }

    Thanks
    Scott

    #376859
    Tom
    Lead Developer
    Lead Developer

    Hmm.. Try switching after_setup_theme with wp.

    #376862
    _blank

    Cool that worked.

    What css class can I use to make the nav arrow and names bigger etc?

    Thanks
    Scott

    #376904
    Leo
    Staff
    Customer Support

    Try Customizer > Typography > Primary Navigation.

    #376907
    _blank

    Hi Leo

    Thank you. That changes the main menu nav !

    Scott

    #376910
    _blank

    Hi Leo

    It’s the navigation items at the bottom of the post such as “Careway” that i would like to change.
    http://be3.mackiedesigncompany.com/wp/work_slug/landmark-wholesale/

    Thanks
    Scott

    #377003
    Leo
    Staff
    Customer Support

    I’m not seeing Careway? Are you referring to the menu in the footer widgets?

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