harveyharveyharvey
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Menu Widget] How to display submenus related to articles/posts?It may be because of your menu configuration
Have you got “Only related sub-items”, “Include parents” and “Post related parents” checked?
I had the same problem. dirty fix is to edit wordpress code…
wordpress version 3.5.2
wp-includes/nav-menu-template.php
comment out line 321function _wp_menu_item_classes_by_context( &$menu_items ) { [...] line 321: $menu_items[$key]->current = false; // comment out this line
hate this solution so if anyone comes up with a better one please let me know!
Forum: Fixing WordPress
In reply to: Custom Post Type/Taxonomy navigation and permalinksSo thought i’d share what i’ve learned.
Simple answer is you can’t do what i was trying to do. Custom Taxonomies and Custom Post Types are separate entities and so could not share (or be fudged to appear as if they share) the same slug.
I was trying to make wordpress hide either the custom post type slug OR the custom taxonomy slug to give the permalink structure i wanted.
So now i have this set-up
Custom post type slug = news
Taxonomy slug = articlesworks a treat and still loving wordpress!
P.S I still use the “Custom Post Type’s Archive in WP Nav Menu” Plugin so my main menu item “News” displays the post type archive AND is always highlighted when on a term or in a post.
Hope my experience helps someone else out
Peas & carrots,
Harvbrilliantayyy!
thank you very much for getting back to me. you have saved me searching through miles of code! i will try this later =)
+1
and me!Forum: Plugins
In reply to: [Advanced Menu Widget] How to display submenus related to articles/posts?Think I also had to change the “Show hierarchy:” setting to “Only strictly related sub-items”
Forum: Plugins
In reply to: [Advanced Menu Widget] How to display submenus related to articles/posts?Sorry for not making it clear.
I posted a larger block of code to help you find it. You only need to comment out one line from that block…
// descend only on current tree
$descend_test = array_intersect( $current_element_markers, $e->classes );if ( empty( $descend_test ) && !$this->direct_path ) {
//unset ( $children_elements );
}You’ll find the block of code near the bottom of the function called walk. Again only need to comment out the one “unset” line as show in bold above
Forum: Plugins
In reply to: [Advanced Menu Widget] How to display submenus related to articles/posts?I have a fix that isn’t pretty but it did the job for my site…
in the following file
advanced-menu-widget/advanced-menu-widget.phplook for the following block of code near the bottom of the Walk method
// descend only on current tree $descend_test = array_intersect( $current_element_markers, $e->classes ); if ( empty( $descend_test ) && !$this->direct_path ) { unset ( $children_elements ); }
comment out the unset line so it looks like this
// descend only on current tree $descend_test = array_intersect( $current_element_markers, $e->classes ); if ( empty( $descend_test ) && !$this->direct_path ) { //unset ( $children_elements ); }
[Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Forum: Plugins
In reply to: [Advanced Menu Widget] How to display submenus related to articles/posts?Also having the same problem.
<u>My set-up looks like this:</u>
– Main menu has only top level items
– Advanced menu widget shows the next level and down of the selected parent item (Achieved with “Only related sub-items” and “Starting depth: 1”)I have “Include parents” and “Post related parents” checked also
The main menu has:
– Catagory 1
and the advanced menu show’s the following children when Category 1 is selected:
– Sub category 1
– Sub category 2But viewing posts in either Sub category doesn’t render the advanced menu at all
Forum: Fixing WordPress
In reply to: show more than 50 comments on index pageThank you so much, it works a treat!
I thought It was going to be a lot more complicated than thatI did try and add the links but they wouldn’t show on the homepage for some reason?
Thanks again =D
Forum: Fixing WordPress
In reply to: show more than 50 comments on index pageGuy’s this is really important to me as it’s for a tribute website for a relative who has passed away can anyone help?