- This topic has 18 replies, 4 voices, and was last updated 6 years, 3 months ago by
Leo.
-
AuthorPosts
-
August 30, 2017 at 11:02 am #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
ScottAugust 30, 2017 at 11:36 am #376257Jamal
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; }
August 31, 2017 at 7:42 am #376732_blank
Hey thanks Jamal, I’ll give it a go.
Regards
ScottAugust 31, 2017 at 8:10 am #376756_blank
Awesome that worked! Cheers Jamal.
ScottAugust 31, 2017 at 8:28 am #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
ScottAugust 31, 2017 at 9:53 am #376849Tom
Lead DeveloperLead DeveloperHi 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 πAugust 31, 2017 at 9:56 am #376850_blank
Hi Tom
Do I add this to snippets?
Thanks
ScottAugust 31, 2017 at 9:58 am #376852Tom
Lead DeveloperLead DeveloperAh sorry, yes π
August 31, 2017 at 10:13 am #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
ScottAugust 31, 2017 at 10:19 am #376859Tom
Lead DeveloperLead DeveloperHmm.. Try switching
after_setup_theme
withwp
.August 31, 2017 at 10:28 am #376862_blank
Cool that worked.
What css class can I use to make the nav arrow and names bigger etc?
Thanks
ScottAugust 31, 2017 at 11:49 am #376904Leo
StaffCustomer SupportTry Customizer > Typography > Primary Navigation.
August 31, 2017 at 11:54 am #376907_blank
Hi Leo
Thank you. That changes the main menu nav !
Scott
August 31, 2017 at 12:00 pm #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
ScottAugust 31, 2017 at 2:30 pm #377003Leo
StaffCustomer SupportI’m not seeing Careway? Are you referring to the menu in the footer widgets?
-
AuthorPosts
- You must be logged in to reply to this topic.