How can I add recent posts to menu like mashable
How can I add recent posts to menu like mashable
How can I add recent posts to menu like mashable
What I did was the following: Look in index.php for the name of the function that creates the older/newer posts links. Search (using the multifile search function of my text editor) for where that function is defined. Open that file and copy the HTML code from there to index.php, replacing the function call. Save index.php … Read more
How to add class and span to
I figured it out, after trying a million things I tried one more, super stupid but it worked, I just went to permalink settings, clicked save changes and my posts and pages are working again… I don’t understand why but finally it’s working again.
It seems to me, you are trying to get the ancestors by the actual post, while you most likely should get the ancestors according to the menu item. Why? Because setting up a hierarchy in the menu does not change the actual post, especially the post_parent property won’t be changed – in short: (other) post … Read more
Add default wp_nav_menu classes to my custom links
Add following CSS code in style.css file of your theme. @media only screen and (max-width: 760px){ .menu-toggle { display: none; } }
For the reasons I probably don’t want to hear about, curiously get_pages() does not actually uses WP_Query internally. Like every other way to retrieve posts does. From a quick look a source it always treats meta_value as string, which I would guess is the reason for you not getting expected behavior. I would suggest to … Read more
When you are adding the menu slug as edit.php?post=706&action=edit, it is adding in the url after admin.php considering it as a new page in admin dashboard (general behaviour of add_menu_page()) So, you should give a fully qualified url instead. I think, admin_url() should help. Try adding admin_url(‘post.php?post=706&action=edit’) Or admin_url(‘edit.php?post=706&action=edit’) instead of edit.php?post=706&action=edit as menu slug.
You can remove the container and ul tag like this: <?php wp_nav_menu( array( ‘container’ => ”, ‘items_wrap’ => ‘%3$s’ ) ); ?> Now you can see an architecture like this: <li> <a href=”#”>item</a> </li> And i think you could adjust your stylesheet to adapt “li” tag. Hope it helps.