- This topic has 7 replies, 2 voices, and was last updated 8 years, 2 months ago by
Tom.
-
AuthorPosts
-
January 8, 2018 at 5:13 pm #466273
Satori
Right now I’m using Pods to create and manage CPT’s, anyway, I’ve noticed the entries for this customs don’t display the default posts nav. Either the category and tags. Any idea how can I fix this?
January 8, 2018 at 9:14 pm #466321Tom
Lead DeveloperLead DeveloperHi there,
Try this:
add_action( 'generate_after_entry_content', 'tu_cpt_footer_meta' ); function tu_cpt_footer_meta() { if ( is_singular( 'your-post-type' ) ) : ?> <footer class="entry-meta"> <?php generate_entry_meta(); ?> <?php generate_content_nav( 'nav-below' ); ?> </footer><!-- .entry-meta --> <?php endif; }Just update the name of your CPT there.
Let me know 🙂
January 10, 2018 at 2:03 am #467344Satori
Hi Tom! The code does not seem to work. I’m using a child theme, so I’m adding the code in the functions.php file. My post type is called “resena”, but still the posts nav doesn’t show up. I purged the cache on my site using WP Rocket but still the same.
January 10, 2018 at 10:16 am #467787Tom
Lead DeveloperLead DeveloperHmm weird, I’m not even seeing the
<footer>markup on your page.To confirm, this is your conditional?
is_singular( 'resena' )January 11, 2018 at 2:23 pm #468748Satori
Hi Tom! I don’t have the footer activated as I’m using one created via Elementor. Anyway the problem seems to be solved now. I read today a plugin called Imagify (which I have installed on this site) was causing issues at php level. Maybe iy was the source of the conflict, as bassically didn’t do anything else yesterday, just leave it as it is, and today when I logged in, the meta was displaying on the custom post type.
The site I’m working on is one of movies’ reviews. I have two CPT’s, one called Critica and one Resena. Want to know how do I add the critica post type, should be something like this?
is_singular( 'resena' 'critica' )Also, I wasn’t consider it before. But I have to use a custom taxonomy called “Genres” to classify the genre of the movie or serie: Sci-Fi, Horror, Thriller, etc. How do I include a custom taxonomy to show just like the default categories on the nav meta.
January 11, 2018 at 8:35 pm #468911Tom
Lead DeveloperLead DeveloperYou would do this:
is_singular( array( 'resena', 'critica' ) )Any chance you can open a new topic about the taxonomies? I think it would be helpful for others to find easily 🙂
Thanks!
January 11, 2018 at 10:51 pm #468966Satori
Sure! Thanks Tom.
January 12, 2018 at 9:30 am #469377Tom
Lead DeveloperLead DeveloperNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.