Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

How to remove search form from page nav?

  1. Hi Justin, I'm Elio from ilovecolors.com.ar. We're using WordPress at the college I work and since I've been using Hybrid to develop a site they bought a subscription to access advanced documentation.
    The question is that I want to use the hybrid_page_nav to display the navigation links at the header and at the footer, displaying the search form only at the header bar. I thought I could use
    remove_action( 'hybrid_after_page_nav', 'hybrid_search_form');
    with priority parameters after including it on the header but it didn't worked. Right now I'm simply using another footer_page_nav() fuction attached to hybrid_footer without the call to hybrid_after_page_nav but it's not cool since it's duplicated code.
    Thanks!

  2. You must be a logged-in exclusive member to view this reply.

  3. Thanks Justin, I'm using Hybrid News. I though I could do something like

    add_action( 'hybrid_before_header', 'hybrid_page_nav', 5);
    add_action( 'hybrid_after_page_nav', 'hybrid_search_form', 5);
    remove_action( 'hybrid_after_page_nav', 'hybrid_search_form', 10);
    add_action( 'hybrid_footer', 'hybrid_page_nav', 15);

    Ok then.

    I'd like to know if you think that the following is correct, I mean, well-mannered from the POV of WP coding. It works, but I want to know what do you think about it.

    function ilc_entry_meta($tipometa=''){
    
    	global $post;
    
    	if($tipometa == 'CATS'){
    		//do something
    	}
    	else if($tipometa == 'TAGS'){
    		//do something else
    	}
    	//output
    }

    the add_action

    add_action( 'ilc_entry_meta', 'ilc_entry_meta');

    and the calls on single.php

    <?php
    	do_action('ilc_entry_meta', 'CATS');
     ?>
    
    	<!-- markup -->
    
    <?php
    	do_action('ilc_entry_meta', 'TAGS');
    ?>

    Is it clean to call do_action simply from the theme to pass the parameters? or should it always be called from within its hook function?

  4. You must be a logged-in exclusive member to view this reply.

  5. I was simply asking if do_action was ok to write on single or singular since I've added new hooks on certain areas where I needed them. Thanks :) no further questions.

  6. You must be a logged-in exclusive member to view this reply.

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Core Framework (55 posts)
  • Hybrid Theme (22,711 posts)
  • Bliss Theme (255 posts)
  • Options Theme (10,362 posts)
  • Visionary Theme (767 posts)
  • WordPress (144 posts)
  • WordPress Plugins (2,146 posts)
  • bbPress Themes (308 posts)
  • General Discussion (5,572 posts)
  • Critical Theme (0 posts)
  • Hybrid News Theme (132 posts)
  • Hybrid Original Theme (26 posts)
  • Leviathan Theme (16 posts)
  • Life Collage Theme (9 posts)
  • Old School Theme (3 posts)
  • Outline Theme (108 posts)
  • Skeleton Theme (40 posts)
  • Structure Theme (2,768 posts)
  • Members Plugin (2 posts)
  • Cleaner Gallery Plugin (14 posts)
  • Get the Image Plugin (3 posts)
  • Message Board Plugin (0 posts)
  • Widgets Reloaded Plugin (0 posts)
  • Breadcrumb Trail Plugin (0 posts)
  • Query Posts Plugin (80 posts)
  • Hybrid Hook Plugin (7 posts)
  • Hybrid Hook Widgets Plugin (0 posts)
  • Hybrid Tabs (5 posts)