Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Help adding category Sub-menus above content on category and child pages « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Help adding category Sub-menus above content on category and child pages

(4 posts)
  • Started 3 years ago by candregg
  • Latest reply from candregg
  • This topic is not resolved

  1. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    candregg

    Member

    Greetings--

    I am trying to add a dynamic sub-menu above the content. The menu would only show sub categories within a category when a user was in that category.

    See the code I'm trying below, derived from this forum and the WP codex:

    //   Add category Sub-menus above content on category and child pages
    
    function custom_childtheme_catmenus(){
    	if( is_category() ) :
    $this_cat_id = get_query_var('cat');?>
    
    <div id="category-sub-menu">
    <ul class="cat-menu">
    <?php wp_list_categories('child_of=' . $this_cat_id); ?>
    </ul>
    
    </div><!-- end custom child category menu -->
    
    <?php }}
    
    add_action('thematic_abovecontent','custom_childtheme_catmenus');

    I keep getting an error flag at the line

    <?php }}

    I'm sure it's something stupid, like leaving out a requisite } or ; character. My syntax is not that good.

    Any help would be appreciated.

    Posted 3 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    you are mixing {} and if: endif; syntax.

    if you use { to open an if statement, close it with a }

    if you use if: to open and if statement, close it with endif;

    so in the case above, change

    if( is_category() ) :

    to

    if( is_category() ) {
    Posted 3 years ago #

  3. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    candregg

    Member

    That worked great! Thank you, Helga.

    This is the resulting code on the website:

    <div id="category-sub-menu">
    <ul class="cat-menu">
    <li class="categories">Categories<ul>	<li class="cat-item cat-item-5652"><a href="http://seacliffmm.com/prod/indigest/admin/?cat=5652" title="View all posts filed under InDialogue">InDialogue</a>
    </li>
    	<li class="cat-item cat-item-5651"><a href="http://seacliffmm.com/prod/indigest/admin/?cat=5651" title="View all posts filed under Music">Music</a>
    </li>
    	<li class="cat-item cat-item-5650"><a href="http://seacliffmm.com/prod/indigest/admin/?cat=5650" title="View all posts filed under News">News</a>
    </li>
    	<li class="cat-item cat-item-5653"><a href="http://seacliffmm.com/prod/indigest/admin/?cat=5653" title="View all posts filed under Reviews">Reviews</a>
    </li>
    </ul></li></ul>
    
    </div><!-- end custom child category menu -->

    How do I modify this code to exclude the first level UL

    <li class="categories">Categories<ul> ...
    
    ...</li></ul>

    and restrict the output to show ONLY the children of the current category. Is there some kind of exclude that I can use? Or can I css "display none" on that top element without making the lower elements disappear as well?

    You can see the site developing at http://seacliffmm.com/prod/indigest/admin/?cat=5648. Be advised that I'm having server issues, so some parts might look messed up (especially the main nav.) Tech support is working on it.

    Thanks!

    Posted 3 years ago #

  4. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    candregg

    Member

    I also have to figure out the code to make it NOT display at all if no sub categories exist.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183