Jump to content


Photo

Page Leads Hack: Add Any Page Lead Above Your Content


  • Please log in to reply
2 replies to this topic

#1 Alex

Alex

    Kolakube Staff

  • Kolakube Admin
  • 3,484 posts

Posted 02 February 2016 - 05:51 PM

Page Leads are scheduled to get a lot of improvements this year to make them more flexible and moveable around your page. As of now, you're restricted to the following page positions:

 

Attached File  Screen Shot 2016-02-02 at 5.37.01 PM.png   38.37KB   0 downloads

 

What's especially useful is you can reorder the positions of each Page Lead with number values. These values, such as 10, determine when each Lead loads. So if you added an Action Lead with an order of 20 and a Funnel Lead with an order of 30, the Action Lead will display on top of the Funnel Lead.

 

...it's a bit tedious (which is why I opened with that improvements line) and can be "hacked" a little to move them to other positions.

 

For example, if you want to display any Page Lead before the main content box set the position to "After Post" and set the order to a number lower than 10, like 5.

 

By setting the position to After Post you load the Page Lead into the md_hook_content hook, which is also where the main content box is loaded to with a default 10 order, you can then move the Page Lead above it by setting the lower 5 value

 

Attached File  Screen Shot 2016-02-02 at 5.49.34 PM.jpeg   101.84KB   0 downloads

 

There will definitely be an easier way to do this one day. Until now, have fun experimenting with different settings combination.


- Alex
Check out the Kolakube blog or follow me on Twitter.

#2 Max Nachamkin

Max Nachamkin

    Member

  • MD Customer
  • PipPip
  • 24 posts

Posted 25 September 2016 - 09:57 PM

Hey Alex, 

 

Thanks for this.

 

For anyone who's curious, you can do this within the templating system as well. I came across this post while I was trying to figure out how to do it within the functions.php page and discovered the following:

 

Simply add a priority integer while using add_action.

 

Example:

add_action('md_hook_before_footer', 'bio_lead', 10); // the 10 is the priority integer
add_action('md_hook_before_footer', 'meditation_lead', 20); // 20 is the priority integer

This would cause the meditation_lead to be right above the footer, and the bio_lead above that. Switching the priority numbers would cause the opposite.



#3 Alex

Alex

    Kolakube Staff

  • Kolakube Admin
  • 3,484 posts

Posted 26 September 2016 - 10:45 AM

Great info Max, thanks for sharing. Based on the names of those custom Leads you're making, it sounds like you have a cool site in the works!


- Alex
Check out the Kolakube blog or follow me on Twitter.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users