• 0
Sign in to follow this  
Followers 0

Poppy Poppy as Menu item?


Question

Posted · Report post

Love the free section "Poppy" with contact shortcodes :)

 

Can anybody tell how I can put it in a regular menu?

For example I have a "Contact" menu item in footer and would like to open the Poppy form when clicked -

how do I get that?

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Posted · Report post

Add to pagelines-customize functions.php/child theme functions.php....

 

function be_menu_extras($menu, $args) {
$extras = do_shortcode( '<li class="menu-item menu-item-type-custom menu-item-object-custom">[poppy type="a"]Contact[/poppy]</li>' );
return $menu . $extras;
}
add_filter('wp_nav_menu_items','be_menu_extras', 10, 2);
4 people like this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Is it possible to only add it to the Fixed Navbar area?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I thinks the name of the menu is passed in the second var $args, use plprint/var_dump or something to print it out, then use some logic.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I tried adding this code to my customize paglines function child theme.

 

1) how do you get poppy to fire from a menu click.

 

What settings in Appearance - >Menus -> Menu Structure -> Customize

 

a) URL?

b) Navigation Label?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

1. You can not have Poppy trigger from a menu item you have added, you will need to use the custom hook above.

 

2. Not sure what you mean by URL? URL for what ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0