How to manage wordpress pages menu from database? - wordpress

How to find where my page titles exists in my database and how to merge with my menus? Maybe I can easily change them using phpmyadmin?
I found that Apearance->Menus is a nightmare when i have more than 40+ menu items. I want to get a workaround idea?

The menu items in the list are derived from each page's title. If you want to create a custom menu editor, use wp_nav_menu. It also helps to make sure that you set each page's parent page.
It might pay to look for a menu editor plugin, as I am sure they exist (No I havn't looked).

Related

I'm using child mylisting theme on wordpress , is there any way to add a button so that my changes appear on all listing pages between content

I'm using child mylisting theme on wordpress , is there any way to add a button so that my changes appear on all listing pages between content.
when adding the button shows like this
any way to add button in content area.
Easiest way is to use child theme. You can then copy across the appropriate template and add in the code for the button.
It sounds complicated but it's really quite simple. It's all explained in the theme documentation:
https://docs.mylistingtheme.com/article/installing-child-theme/

WP can't easily select pages to add to navigation menu

my problem is adding pages in wordpress navigation menus because there are many pages in my site and the pages meta box (in appearence -> menus) is not well indented. So, I can't find easily the right page in the list.
There is a way for reorder the page list hierarchically?
Thanks
Why not using the search? It's useful and easy!
first get your pages address in pages worpress bar
then go to appearence>menu and there you can add cusstom links to anything like your pages
I had the same issue until I used the Order field and Parent in Pages, you can sort and manage your pages in an order that will show in appearance -> Menus, you will see it as is in the following image.

Blog posts not highlighting the active menu item

Ok, I know that there are several other questions on SO regarding this topic. By now, I have probably read all of them. I have been researching this for a little over two hours now and I am coming to the end of the road (about to give up!)... So, here I am on SO finally asking the question to involve other sharp minds.
I am helping build this Wordpress site: greatman.us. And, the Posts page is located on a page called "Blog." The "active" menu item is highlighting properly on PAGES, but when you go to a POST, the "Blog" menu item is not longer highlighted (i.e. NOTHING is highlighted in the header menu).
There is no way in Wordpress - as far as I'm aware - to create a "parent" for a blog post. This option is only available for Pages. I need to be able to have the "Blog" menu item stay highlighted when I am viewing a BLOG POST.
For a general example:
mywebsite.com/blog/ <--- menu item "Blog" is highlighted
mywebsite.com/blog/post223 <--- menu item "Blog" is no longer highlighted
I am proficient with CSS and HTML, but not with PHP. So, if this is a PHP fix, please dumb your answer down as much as possible.
I have read tons of other articles about this online and it seems to be a common issue, with most people not knowing how to code with PHP.
I am using a custom theme, called Divi. And it is missing some of the CSS elements that other forums and sites I have read said that the style.css should have. This is another reason I am coming to a dead end. Please help!
By the way, one WORKAROUND I discovered is to add POSTS as sub-menu items to the "Blog" page that you made in the Wordpress Menus area (in the admin back-end). Then, use "display:none" is CSS to remove the submenu from being displayed to the public. This causes two main problems, though: 1) You can never have any other sub-menu items, because they won't be displayed. 2) You have to manually add every single blog post to the menu as a sub-menu item. This will eventually make your menu super long assuming you are a regular blogger. It is also a hassle.
Within your CSS, you will also need to add .current-page-ancestor with the same attribtues as your current menu item.
Something similar to below:
.current_page_item, .current-page-ancestor {
// Some attributes
}
This is guessing that you have use wp_nav_menu() though. If not then I'll need to see what code you have used to generate the menus.

posts as children of wp_list_pages item

i have a vertical menu that looks like this
HOME
NEWS
ANOTHER PAGE
- SUB PAGE
- SUB PAGE
it is retrieved via wp_list_pages. NEWS is set as my posts page in the WP backend.
what i want to achieve is getting the titles of the 3 latest posts to show up as a submenu of NEWS like so:
HOME
NEWS
- POST 3
- POST 2
- POST 1
ANOTHER PAGE
- SUB PAGE
- SUB PAGE
is there some sort of add_filter/function or even plugin to achieve this?
The problem looks as if you're trying to use a Page Object as a sort of "shell" for corresponding posts. This is probably one of the first traps a Wordpress Developer will find themselves in when developing their own themes, or working with existing code.
In short, you shouldn't use wp_list_pages if you're trying to also list Post Objects. It gets messy, and you're essentially circumventing existing methods that Wordpress provides to do exactly what you need.
What you'll want to do is look into is the built-in Navigation Menus to build out a more flexible menu. If you're using a downloaded theme, then it will almost certainly be supported. Otherwise, you'll need to look into Registering a Navigation Menu to make your theme "menu-aware".
What this will enable you to do is build a flexible menu that supports not only Pages, but also Categories and individual Posts in an intuitive UI. I would suggest deleting that Page Object called "News" altogether, and instead place the News Category in your menu alongside all of your Page Objects in whatever order you like.
As for querying the most recent three posts in your Navigation Menu as sub-menus, this will be a little more complicated to do with pure code.
What I would suggest is to look into this option first. Build out a working - albeit static - prototype to get a feel for the Menu Interface. If you're writing your own theme, replace your wp_list_pages call altogether with wp_nav_menu.
Once you get that working, open a new question to see how to write your own Nav Menu Walker to make everything display exactly how you want.
By taking this approach, you'll ensure that your theme will ALWAYS behave how you want automatically, rather than having to go in every so often to patch things up.
Let me know if this helps.

drupal: forum in menu

I created a container with a couple of forums. How do I get it to appear in my menu?
I have book called "community", and I want the forum container to appear as a child of that book. I thought I could do it by using a view. I selected node:type-->forum topic as a filter, but I don't know what to enter in this field. It doesn't seem to be working.
How can I do this?
If you have just a few containers, you can simply create the menu links by hand, make sure that you have the menu.module enabled.
You can also check out http://drupal.org/project/taxonomy_menu, it allows to display taxonomies in the menu automatically and forums depend on taxonomy.

Resources