WordPress wp get nav menu items does not deliver external link
For some reason when I use $link = $item->url now it works. Instead of $link = get_page_link( $id ).
For some reason when I use $link = $item->url now it works. Instead of $link = get_page_link( $id ).
The reason this was happening was simple – I had just installed the theme and had not yet associated a menu with the ‘main_menu’ theme location. Once I had the menu assigned, the markup generated acted as expected. To assign a menu, go to Appearance > Menus then select the Manage Locations tab. On there … Read more
I think i have a function that will do it for you. The usual WP way to highlight the menu item is to add the class “current-menu-item” to the item, then you can style highlighted links with CSS. In this case you want to highlight a taxonomy menu link if we’re in a post for … Read more
You have to install a mega-menu plugin see on codecanyon u can try it with css html php sample Mega Menu Jquery you can show post on screen in Screen option in menu
If I understood your question correctly: set your permalink structure as /%category%/%post%/ and from your mega menu create custom links for taxonomies categories and single posts.
Have you updated the links in your database? Are they still pointing to your live site? Sorry, I will elaborate. If you download your database you will see that the url for your live site will appear several times. For example: INSERT INTO `wpfr_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES (1, ‘siteurl’, ‘http://www.yourwebsite.com’, ‘yes’), The quickest … Read more
Make sure your menu does setup correctly in that location in Appearance / Menus, unless it wont display that class. After you set the theme location to Primary Menu, it should work fine. No idea why, guess its a bug in WordPress. Also fix the typo: ‘container’ => false
1 Insert the page link 2 Right click on “original” and copy URL Address 3 Remove the page link 4 Insert Custom Link and past the Url Address
You can use is_category() You can check the documentation here function show_parent_categories( $args = array() ) { $args = array( ‘hierarchical’ => 1, ‘show_option_none’ => ”, ‘hide_empty’ => 0, ‘parent’ => $category->term_id, ‘taxonomy’ => ‘product_cat’ ); $product_categories = get_terms( ‘product_cat’, $args ); $count = count($product_categories); if ( $count > 0 ){ echo “<div id=’main-categories-wrapper’><ul id=’main-categories’>”; … Read more
<h1><a href=”https://wordpress.stackexchange.com/questions/241420/<?php echo home_url();?>”><?php bloginfo(‘name’); ?></h1> Soooo I forgot to close my link tag in my header. Deeerp. Lol <h1><a href=”https://wordpress.stackexchange.com/questions/241420/<?php echo home_url();?>”><?php bloginfo(‘name’); ?> </a> </h1> closing the tag fixes the issue.