Sub-menu disappears when I enter single item page (6 posts)

  1. spakainas
    Posted 2 years ago #

    I have a simple problem but "surprisingly" it's horribly hard to solve it.
    So, I have a page which have categories of products "Moteriškos".
    When you click on "Pėdutės" you go into sub-category.
    WHEN you click on any of those 8 items the sub-menu disappers.
    The question is if there is any possibility to solve it and how?

    Thank you in advance!


  2. mbrsolution
    Posted 2 years ago #

    Hello spakainas what is your permalink structure? What settings do you have set for the CataBlog options?

    You might want to try this tutorial. It might help you.

    Kind regards

  3. spakainas
    Posted 2 years ago #

    Hey, thanks for your answer. Sadly this tutorial doesn't help. And it actually doesn't suit my problem since my permalinks all work, the problem is with items disappearing when I go into single page item from catalog.
    My permalink structure is Default. (example - ?p=123)

    I believe it has something to do with link structure.
    Maybe it has to do with how many is written in functions.php ? I noticed this is also a problem on standart WordPress layout too. The only difference is that there you see sub-menu on hover (not always when you go into it). So you can notice that when you go into product the sub-menu link becomes not "marked" (active).
    And the sub-menu navigation is registered in functions.php . Maybe this should be modified somehow?

    function sm_subnav()
    	global $post, $wpdb;
    	if ( is_page() )
    		$child_of = null;
    		if ( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='page' && post_parent = ".$post->ID) > 0 ){
    			$child_of = $post->ID;
    		else if ( $post->post_parent != 0 ){
    			$child_of = $post->post_parent;
    		if ( !is_null($child_of) )
    			echo '<div class="navigation" id="sub-nav-1">' . "\n";
    				echo '<ul class="katalogas">' . "\n";
    				echo '</ul>' . "\n";
    				echo '<div class="clearer"> </div>' . "\n";
    			echo '</div>' . "\n";
  4. mbrsolution
    Posted 2 years ago #

    Hello sorry that my link could not help you. In regards to the default permalink, I would never use that as it is bad for SEO and it can cause other issues especially with plugins etc. The permalink I always suggest to my clients is:

    /%category%/%postname%/ or /%postname%/

    What theme are you using? Have you tried a default WordPress theme to see if you still have this issue?

    What settings have you enabled to the CataBlog plugin?

    Kind regards

  5. spakainas
    Posted 2 years ago #

    I have tried the default theme. The same problem. Yes, I know this structure. I will change it later. Thanks for suggestions. :)

  6. mbrsolution
    Posted 2 years ago #

    Hello looking at your theme the second navigation,

    <div id="sub-nav-1" class="navigation">

    Is not added to the catablog template when you click on your item, which I know you are aware of that. Where is that navigation coming from? Is that from a plugin or from your theme or did you develop the navigation yourself?

    Have you tried to integrate catablog into your theme?

    Kind regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic