Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1016465

    Hi there,

    I have created two different blog sections on my website. Now I realise that I have a problem on the single post page. A number 28 is popping up on the top bar of the main header when I click here:

    https://goo.gl/mMDzb9

    A number 168 is coming out instead when I click on these blog pages:

    https://goo.gl/k44rf7
    https://goo.gl/y2mEdw

    Any ideas?

    Regards
    D.

    #1016467

    Hey David,

    Did you try to disable all plugins to see if one of them is causing that to happen? If that is not the case then please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #1016475

    Hi Rikard,

    I got it. The plugin that is creating the problem is Toc-Toc – Video Live Chat. I will try to contact the developer to ask to fix the problem.

    I have only one question. Does Enfold support only one blog section? I did create two different sections:

    https://goo.gl/jXkNBg
    https://goo.gl/x8HzE3

    When I click on a post from the last one for example here:

    https://goo.gl/Fbp4T5

    The active menu became NEWS, but it is not correct.

    Regards
    D.

    #1017009

    Hi dmiklus,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1017358

    Hi Victoria,

    In the private content the login details.

    Let me know!

    Regards
    D.

    #1018019

    Hi,

    The “News” page is set as the default blog or posts page, so the “News” menu item will get tagged as the current menu item whenever a single post page is displayed. Did you apply unique categories to the “boer-piu-di-cosi” posts? You can use this filter to remove the “current-menu-item” attribute.

    add_filter('walker_nav_menu_start_el', 'avf_walker_nav_menu_start_el_mod', 10, 4);
    function avf_walker_nav_menu_start_el_mod($item_output, $item, $depth, $args) {
        $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
        $blog_id = avia_get_option('blogpage');
        if($depth === 0 && $blog_id && $blog_id == $item->object_id && is_singular('post'))
        {   
            $classes = empty( $item->classes ) ? array() : (array) $item->classes;
            $class_names = $value = '';
            $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
            if($depth === 0 ) $class_names .= " menu-item-top-level menu-item-top-level-".$item->first_level_count;
            $class_names = ' class="'.esc_attr( $class_names ) . $column_class .'"';
    
            $item_output = "";
            $item_output .= $indent . '
     	<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>';
            $item_output .= $args->before;
            $item_output .= '<a'. $attributes .'><span class="avia-bullet"></span>';
            $item_output .= $args->link_before .'<span class="avia-menu-text">'. do_shortcode(apply_filters('the_title', $item->title, $item->ID)) ."</span>". $args->link_after;
            if($depth === 0) 
            {
                if(!empty($item->description))
                {
                    $item_output .= '<span class="avia-menu-subtext">'. do_shortcode($item->description) ."</span>";
                }
    
                $item_output .= '<span class="avia-menu-fx"><span class="avia-arrow-wrap"><span class="avia-arrow"></span></span></span>';
            }
    
            $item_output .= '</a>';
            $item_output .= $args->after;
            $item_output .= "</li>
    \n";
        }
        return $item_output;
    }

    Best regards,
    Ismael

    #1018022

    Hi Ismael,
    The new section has different unique categories. If I apply the snipped code above, then the menu NEWS is not a link anymore when I am in that specific blog post page (new section). I will leave it in this way for now.

    Please consider for future updates to add this functionality. Sometimes having two or more blog/news section can be useful.

    Regards
    D.

    #1018164

    Hi,

    Thanks for the update, we’ll leave this thread open in case you should need any further help on the topic.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.