Olegs Belousovs
Forum Replies Created
-
You can create a new walker class filter and assign it to your wp_nav_menu function.
Example:
In your functions.php file add:
class My_Walker_Nav_Menu extends Walker_Nav_Menu { function start_lvl(&$output, $depth) { $indent = str_repeat("\t", $depth); $output .= "\n$indent<ul class=\"menu-nav navbar-nav scroll-menu\">\n"; } function start_el(&$output, $item, $depth, $args) { $output.= '<li>'; $attributes = ' itemprop="url" target="_blank" href="' .esc_attr($item->url). '" title="' .esc_attr($item->attr_title). '"'; $item_output = $args->before; $current_url = (is_ssl()?'https://':'https://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $item_url = esc_attr( $item->url ); $item_output.= '<a'. $attributes .'>'.$item->title.'</a>'; $item_output.= $args->after; $output.= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } }
Now add your walker filter to your wp_nav_menu:
<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'theme_location' => 'header-menu', 'items_wrap' => '<ul class="menu-nav navbar-nav scroll-menu">%3$s</ul>', 'container_class' => 'collapse navbar-collapse menu-header ', 'walker' => new My_Walker_Nav_Menu(), ) ); ?>
Source: https://webformyself.com/forum/index.php?showtopic=2887
You can create a new walker class filter and asign it to your wp_nav_menu function.
Example:
In your functions.php file add:
class My_Walker_Nav_Menu extends Walker_Nav_Menu { function start_lvl(&$output, $depth) { $indent = str_repeat("\t", $depth); $output .= "\n$indent<ul class=\"menu-nav navbar-nav scroll-menu\">\n"; } function start_el(&$output, $item, $depth, $args) { $output.= '<li>'; $attributes = ' itemprop="url" target="_blank" href="' .esc_attr($item->url). '" title="' .esc_attr($item->attr_title). '"'; $item_output = $args->before; $current_url = (is_ssl()?'https://':'https://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $item_url = esc_attr( $item->url ); $item_output.= '<a'. $attributes .'>'.$item->title.'</a>'; $item_output.= $args->after; $output.= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } }
Now add your walker filter to your wp_nav_menu:
<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'theme_location' => 'header-menu', 'items_wrap' => '<ul class="menu-nav navbar-nav scroll-menu">%3$s</ul>', 'container_class' => 'collapse navbar-collapse menu-header ', 'walker' => new My_Walker_Nav_Menu(), ) ); ?>
Source: https://webformyself.com/forum/index.php?showtopic=2887
Forum: Fixing WordPress
In reply to: uploading documentsYou can’t preview PDF and Word documents inside WordPress, only image files.
Forum: Plugins
In reply to: [WordPress Related Posts] Crashing the Chrome Browser on MacThe blog post loads and then it stops where the text finish and begins the code of your plugin, then crashes… without the loading of the comments module and footer.
Forum: Plugins
In reply to: [WordPress Related Posts] Crashing the Chrome Browser on MacWhat happened exactly? – On trying to access any single post of the blog (on site not in admin) Chrome Browser crashes with the screen of Sad Tab Page…https://support.google.com/chrome/answer/95669?p=e_awsnap&rd=1&hl=en
Which site did crash exactly, at what exact time? https://yesmoke.eu/ this morning before 12:00 UTC/GMT +1 hour
After you updated the plugin? – Yes, yesterday evening i updated the plugin to 3.3.3, but this morning my boss said me what tonight he had some issues to view post on his Mac in Chrome. So i discovered and fixed it with the deactivation of your plugin.
The Plugins page of your WP Dashboard? – No the single blog posts.
Did the blog load or not? – The blog yes, the single post not.
May we ask you if you have any other related posts plugins installed? What code exactly are you talking about? – No.
Thanks for help.
Same thing. Deactivated it and now it’s ok with the image uploading.
Forum: Plugins
In reply to: [WP CleanFix] Upgrading to the latest wp-cleanfix broke our siteThis update broke my sites too. Rename the folder on your server to fix. Please we are waiting for the updates and fixes. Thanks.
Forum: Themes and Templates
In reply to: Pagination with custom post type listing@rafaelxy & @bigevilbrain Thank you so much!!! Became crazy for a half day… all that solutions online don’t works. This is the hack! Clap clap!!