WordPress 3 - Problem with menu highlighting - wordpress

I'm building a site that has a two level menu created with the admin Menu tool. The menu contains links to both Pages and Category lists. It doesn't link directly to Posts. The problem is that when you drill down into a Category list and click to view a single post in that Category, the menu highlighting gets it wrong.
I've tested on a new install of WP3, set up a simple test site with a few pages and posts in 3 categories. All I've changed in the theme is the style.css to highlight the whole path.
http://danwashere.com/wp_dev/
Here's a direct link to view a categorised post here:
http://danwashere.com/wp_dev/2011/07/28/blue-rocks/
Everything is a page, except with the section "Advice Categories" - all those sub items are category lists containing categorised posts - each post is only categorised with a single category. The menu structure is defined entirely in the Menu settings.
On that Blue Rocks page, the menu should be highlighted like this: Advice Categories -> Rocks, but it's highlighting the Sample Page item. And if you rollover the "Advice Categories" menu, you'll see that it is correctly highlighting the "Rocks" menu item.
It seems to me that WP is applying the 'current-post-parent' class to the wrong top menu item, but maybe I'm missing something?
// Edit, rewrite to make it clearer.

It seems as though were both having very similar issues. - Trouble highlighting correct menu parent with wp_nav_menu classes while viewing “single posts”
Im not using categories as links in my menu but I use them to filter content to each page via query_posts...if you examine the output from Wordpress you'll notice its actually placing the current page class onto the incorrect li tag when viewing a single post - Is this happening to you as well?

Related

How do I highlight a tab in Wordpress for a post when the main menu item is a category?

On my Wordpress site I have the main primary menu set up with links to pages & top level categories. When I'm viewing a page the top menu highlights the proper menu item and all works just fine, but when I click on a post that falls under one of the category menu items it is not highlighted. I want the category menu item to highlight when I click on a post that uses that category. How would I accomplish that?
Website: http://deutschmetal.com If you click on this post: http://deutschmetal.com/deutsch-metal-videos/rammstein-herzeleid-videos/ you can see that the top menu link "Videos" is not highlighted. I would like it to be highlighted when viewing the post.
Wordpress detects it if a page is the child of a page in the navigation. It also adds a extra class to it, so you can create some new CSS to make it look the way you want. In your case this would be:
.current-post-parent.current-post-ancestor {
background: #cb0808;
}
You can add this in your Wordpress theme, or if you are not familiar with coding you can use the customizer's custom CSS that is supported is most of the themes.

WP showing two active menu items at the same time

One of the pages on my site is setup to display posts from a specific category. When that category is active, the blog menu item also shows as active, displaying two active menu items at the same time. I've tried excluding the category, but that hasn't worked.
It may be a hotlinking issue.
s
You'll see from this site at http://www.wildpop.ca (Wildpop dot.ca), when you choose "SEO" from the menu, you are directed to what appears to be the "Monthly Packages" page. The SEO link in the menu does not have it's own page. It is a direct link to a section named (seo_direct) that is contained in a different page, but when you look at the menu again - both menu options are highlighted as "Active Page".
Make sure this isn't the issue for you.

Adding Custom Pages in Wordpress

I am making my first steps learning to code, so I am building a Wordpress theme to make some experiments and see how everything works from the practice.
I installed wordpress locally and I a made a Child Theme. Now to start designing my new theme I started watching how the wordpress structure works and there is something that I don't understand:
I am making my portfolio, and I have some sections (Paintings, Films and Photography). And each section has a subcategory.
It means that each section is a page and each subcategory is a post? Or each section is a page and each category is a page too?
You can add your subcategories as subpages for to other pages. To do so, follow these steps:
Go to Administration > Pages > Add New panel.
In the right menu, click the "Page Parent" drop-down menu.
The drop-down menu contains a list of all the Pages already created for your site.
Select the appropriate parent Page from the drop-down menu to make the current Page a child Page.
Add content to the subpage.
Click Publish when ready.
More information on pages here: https://codex.wordpress.org/Pages

Joomla not showing articles

For reference, This is what the site looks like,
here is the index.php
and
here is the current template.css being used.
My problems are as follow:
Using the first menu, [Quem Somos] as example, I've created a category and under it I've put some articles. Using the default mod_mainmenu, how would I make it display a dropdown menu?
I can't do it even if the primary menu items are created as lists of categories or, when the submenus are linked directly to articles and then these submenus are linked to a primary menu, the module just shows that one level pill menu shown. Do i need an extra module or something? am meddling with swmenufree but am guessing something basic as a dropdown menu fed by a category/section is something that should be built in.
In my quest for a 3 column template I've most definitively destroyed something and now whenever i click any link (all links have articles to back them up) the site just shows the same main page. clicking and typing (c&p actually) the entire URL in the address bar gets me nowhere also. The URL it shows is correct but what i keep seeing is the landing page
Looks like you're missing the following:
<jdoc:include type="component" />
Place this where you want your content to appear (your middle column)

How can I hide pages from menus in WordPress?

I only want to show the pages that do not have parents, and link the other pages from their parent pages.
I want to have a simple main menu: Home | Pages | About | Contact
About 8 pages are linked from the Pages page. At the moment, the menu has 12 items, which deforms the layout pretty badly.
I have tried making the pages private, unpublished, and other options, but that doesn't seem to be the way to do it. Is there a way I can just have only parent pages linked in the main menu?
You can edit the menu (under the appearance tab in the dashboard). (you may need to add a new menu and assign it to the main navigation menu. It sounds like you have the defaulted menu set-up.
Once you've added a menu and assigned it to the main navigation, you can uncheck "automatically add top-level elements" or its equivalent, and add/remove menu items. You can also change their hierarchy (independent of actual page hierarchy).
It's all so easy these days. Just Go to appearance>menus>click the little triangle next to the listed page name>click remove> don't forget to save ... all done!
Maybe you didn't set up a custom menu yet. Set up a custom menu first with the desired pages / links. If it doesn't show on your site, check custom memus are enabled in your theme.. this will help you setting up a custom menu: http://www.wpbeginner.com/wp-themes/how-to-add-custom-navigation-menus-in-wordpress-3-0-themes/

Resources