There is an issue with wordpress menu, I'll be very grateful if you help me.
See please screenshot.
Menu item "Destinations" is a category. "Elbrus 5642", "Baikal lake", is sub categories for 'Destinations'. And in every sub category I need to show posts for that sub category.
I thought to do it manually in code, e.g. call posts in sub category "Elbrus 5642" with query posts. But that way I need to every time change my code when I add or remove sub categories. Is there any method, which allow to automate this process, e.g. I adding some sub category in menu admin panel, creating some posts for that sub category and they are automatically added in menu?
Thanks for any advice.
Try this plugin, I think it's what you need.
Related
I am kinda unlucky to find a proper solution in order to display posts by their category. I made a page template that should be supposted to be used in order to display posts by category.
Lets say there is a page "Cats" and page "Dogs" and the same named categories for posts are created and assigned depending on either it is cats or dogs.
How to loop through that?
It should follow dynamics to loop posts of category that is named the same as page title(all those pages using same page template). This should solve the case when you need new page for new category and you don't want to dig into the code and so on.
I would really appreciate the help. Thanks in forward!
If you follow the WordPress template hierarchy, you simply need to name a template file with the category name.
http://codex.wordpress.org/Category_Templates
On a Wordpress website where you configure the navigation bar and you can show categories, and put child categories underneath the parents, is there a way to make it so that when someone hovers over the top level category that the drop down that pops up shows the individual posts within that category? And then you can click the post and go to that single post page?
This plugin sounds like what you need.
http://wordpress.org/plugins/category-posts-in-custom-menu/
I am creating a wordpress theme, and as a beginner, I am having difficulties. The website will be a products portfolio, but not e commerce. It has a main menu of categories, and another menu on the sidebar with categories. The posts will be sorted by two categories. First of all, by the main category in the header, and then, those posts will be sorted by the other categories in the sidebar. I have no idea how to do this. Tried a lot to think of something, but I can't come up with anything. I hope you can help me how to sort it out.
I had an idea to use TAGS as sidebar categories, but I couldn't get it to work.
Thanks.
Take a look at wp_nav_menu()
The wordpress backend has a menu making system where you can make menus based on pages/posts/categories. These menu items will take you to a page with a list of all the posts existing in those categories.
So:
make your categories
go to the menu maker
create the 1st menu and assign categories
create your 2nd menu and assign categories
Use wp_nav_menu() to pull the specific menu in. The docs that I linked give you a good overview of how to get the menu you want.
You will have to style these menus appropriately.
Good luck and happy coding! If you have any specific questions, feel free to ask and I can expand on it further.
I'm having this situation:
In a Wordpress blog I have my main navigation persisting of categories. The navigation is being created with wp_list_categories().
Now I'd like to mingle just one link to a page at a certain position within this navigation built of only categories.
Any ideas how I could accomplish this?
Thanks a lot!
sprain
Use http://codex.wordpress.org/Function_Reference/wp_list_pages and exclude the pages you don't want in the menu:
<php wp_list_pages(title_li&exclude=X;);?>
where 'X' is the id number of the page you want to exclude. Or use a plugin like Exclude Pages.
Do the same with http://codex.wordpress.org/Template_Tags/wp_list_categories to split the category listings and put the page listings within the category menu.
Use Reveal IDs for WP Admin « WordPress Plugins to find page IDs.
I'd like to show only specific wordpress categories (with their sub-categories nested), so for example:
Main Category 1
Sub Category 1.1
Sub Category 1.2
Main Category 5
Sub Category 2.1
Sub Category 2.2
... I can hardcode it inside the sidebar template, but I'd like to know if there's any existing plugin/widget that allows this so I can easily manage category selection/update via admin panel.
Many thanks
You can accomplish this using the wp-list-categories tag. I'm assuming you're customising your template and this came up?
The function has enough parameters to customise it as you need.