Home › Forums › Add Tags And Category to Page and Post Types › Causes main menu to disappear
- This topic has 17 replies, 1 voice, and was last updated 9 years, 5 months ago by Kelicia.
-
AuthorPosts
-
October 5, 2013 at 4:56 pm #2009nurikabeGuest
Seems to work, but causes the main menu to disappear when I have a static front page and another page that lists posts from a specific category. Main menu is missing on the category posts page.
November 1, 2013 at 6:23 am #2115Jed HartmanGuestMe too. I reported this as a bug last week, but my bug report is listed as still awaiting moderation. Is there another way to contact the author of this plugin? It’s a great plugin, aside from this menu problem.
November 2, 2013 at 8:24 am #2120laxyaGuestSame problem here! after a week sweating a lot, i finally found this great plugin..that fits my need…thanks …….but menu disappears when i click on catergories link on the widget
November 3, 2013 at 5:12 am #2133HansGuestYou must recreate list of category and next recreate a menu.
November 5, 2013 at 8:39 am #2140LeoGuestSame problem. Main menu is missing when click on any category or tag on my blog. Tried to recreate list of category and menu – doesn’t help
November 8, 2013 at 6:26 am #2159Jeremy BlakeGuestSame problem here. I also tried creating a new menu, but that didn’t help.
Wordpress 3.7.1.
November 9, 2013 at 4:55 am #2164Jeremy BlakeGuestI figured out an alternative solution for anybody having the same issue.
Install this plugin: http://wordpress.org/plugins/tag-pages/
then in tag-pages.php change ‘page’ to whatever your custom post type is. For me this was ‘landing_page’.
So it will look something like:
register_taxonomy_for_object_type('post_tag', 'landing_page');
If you want to add categories to your custom post type, just add:
register_taxonomy_for_object_type('category', 'landing_page');
November 9, 2013 at 6:45 am #2165Jeremy BlakeGuestI don’t think there is a bug in the plugin after all. Just make sure to include this in functions.php file and update your custom post type:
function namespace_add_custom_types( $query ) { if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { $query->set( 'post_type', array( 'post', 'nav_menu_item', '<strong>YOURCUSTOMPOSTTYPE</strong>' )); return $query; } } add_filter( 'pre_get_posts', 'namespace_add_custom_types' );
November 16, 2013 at 2:58 pm #2209nurikabeGuestMy workaround for now is to activate this plugin, apply categories to the requisite pages, and then deactivate it. The pages retain the categories in the database and work as expected. With the plugin deactivated my menus behave normally.
November 16, 2013 at 6:35 pm #2210elioGuestHi there,
i’m having the same issue here and it kinda sucks because the plugin is actually really useful. Jeremy could you be a bit more specific about your workaround? Where should I place the code inside function.php? I’m using the plugin mostly to add categories and tags to pages…will it work?Thanks a lot 🙂
CheersNovember 30, 2013 at 7:26 pm #2272SteveGuestElio: Jeremy’s solutions works for me. 1. Place his code into the functions file of your child theme. 2. Replace ‘< strong >YOURCUSTOMPOSTTYPE</ strong >’ with ‘page’.
December 7, 2013 at 7:37 pm #2527WoutGuestHallo, ich mf6chte den headlineanimator gerne auf mneeir Volleyball-Seite ausprobieren, aber ich bin ganz ehrlich mit der Installationsanleitung nicht zufrieden. Ich hab das Plugin hochgeladen und aktiviert, und nun weidf ich nicht weiter. Soll das admin interface zum konfigurieren der Plugin-Editor sein, in dem ich dann den Quelltext durchforsten muss? make sure that the file you want to write your animator to is writeable for php welche datei soll das sein, wo kann ich das angeben? Wenn ich das weiss und die Datei generiert wird geb ich auch gerne weiteres Feedback. Vorerst schonmal Danke ffcr Deine Bemfchungen!
February 10, 2014 at 11:14 pm #2925ShepGuestElio: Except that once you change ‘< strong >YOURCUSTOMPOSTTYPE</ strong >’ with ‘page’, the Word Press ‘recent posts’ widget displays all pages with their ID number and not title.
Any ideas on how to change this?
March 9, 2014 at 11:54 am #2961John CliffordGuestSteve, thanks for clarifying, I attempted to follow as you instructed, but the plugin doesn’t function while restoring the nav menus.
I thought using sub or parent categories may have been an issue, so edited categories to remove subs from parents, but no impact.
March 9, 2014 at 12:08 pm #2962John CliffordGuestI also attempted the Tag Pages plugin solution offered above.
Same result –> yes, I’m able to add the category to the page, but when displaying my category page, only posts and not my pages appear.
-
AuthorPosts
- The topic ‘Causes main menu to disappear’ is closed to new replies.