Hi MRM-Racing, this could be a good idea.
You might want to read the linked snippet to add a button in your WordPress menu.
Thank’s Nikeo, I already have a class for the menus and this is a form code [mc4wp_form] I would like to have at the right in td-header.
To the left I have brand-logo, menu centered and this piece of code to the right in tc-header.
/Robert
Thx, I will see what it leads to 🙂
Instead of this code that insert search form;
add_filter(‘tc_tagline_display’, ‘display_search_box’);
function display_search_box($html){
global $wp_current_filter;
$search_box = get_search_form(false); //don’t echo it
if ( in_array(‘__navbar’, $wp_current_filter) )
// replace tagline in portrait viewport
return ‘<div class=”span7 search-navbar”>’.$search_box.'</div>’;
else
// append searchbox to the tagline in mobile viewport
return str_replace(‘</div>’, $search_box . ‘</div>’, $html);}
If I would like to insert this short code : [mc4wp_form]
Any ideas?
instead of
$search_box
use
$my_content
so
$my_content= do_shortcode('[mc4wp_form]')
Thank’s for you help so far, i did manage to get it to work with this text just before <header/> code;
<div class=”subscribe”>
<?php echo do_shortcode(‘[mc4wp_form]’); ?>
</div>
But it seems not so professional with that, how can I mod the code above to use it in functions? It did work when I used $my_content so but it ended up pushing menu down.
Many thanks for helping me out 🙂
before the closing tag </header>
..
So there’s one of the wonderful nikeo’s hooks there, and it’s called “__after_navbar”:
add_action('__after_navbar', 'display_subscription');
function display_subscription(){
echo do_shortcode('[mc4wp_form]');
}
Should be enough.. Let me know if it’s not 😀
Well it shows up as it should now, will try to get it some css after the eastern dinner now 🙂
Thank’s
/Robert