Jump to content


Photo
- - - - -

How to hook sharebar below page title? (not on blog posts or excerpts)

sharebar hook

  • Please log in to reply
4 replies to this topic

#1 zvelena

zvelena

    Advanced Member

  • Members
  • 74 posts

Posted 15 September 2012 - 09:16 AM

I want to add the sharebar below page titles on regular pages (not blog posts or excerpts).
I have found a great fix by @seanriceaz. I just changed 'pagelines_loop_after_excerpt' with 'pagelines_loop_above_content'
The code for functions.php is:

Please Login or Register to see this Hidden Content


It works fine, however it is duplicating the sharebar on posts pages and excerpts, which are handled by default by the framework.
Any idea how I can add the sharebar under pagetitles on pages without duplicating them on posts pages ?

Thanks
Elena

#2 batman

batman

    Bat Learning

  • Members

  • 2085 posts
  • LocationBuenos Aires, Argentina
  • Framework Version:DMS
  • Country: Country Flag

Posted 15 September 2012 - 10:14 AM

Hi Elena
You can hide Sharebar at Pageline Meta Setting to resolve the duplicating.

If you want add the sharebar under pagetittles on pages you can use this hook

'pagelines_loop_before_post_content'

You can add with Hook iFrames and javascript (provided by the companies themselves) they may be hard to style and control.

#3 zvelena

zvelena

    Advanced Member

  • Members
  • 74 posts

Posted 15 September 2012 - 10:33 AM

HI Batman.
Thx for the answer.

I dont have the sharebar section activated. It is not possible to pull it inside the content from the drag and drop menu. I want to use the sharebar that exists by default in metabar and usually shows on blog posts and excerpts under the title. I'd like to hook it under page titles (applies to any page or post, hence the duplicating).

If I deactivate the sharebar items from the Site options - Blog and Posts menu, the sharebar as a whole disappears from the blog posts and excerpts. I mention I am using the Pagelines Framework 2.5.5

#4 batman

batman

    Bat Learning

  • Members

  • 2085 posts
  • LocationBuenos Aires, Argentina
  • Framework Version:DMS
  • Country: Country Flag

Posted 15 September 2012 - 11:42 AM

Hi zvelena
I´m a newbie, but you can try add this hook for sharebar under tittle

Please Login or Register to see this Hidden Content



#5 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 16 September 2012 - 12:08 AM

Elena, as good as I am with hooks, this one's beyond me at the moment. However, I'm told "You can edit the section header and put the page template in there." Don't ask me what that means.

If you're going to edit a section, I'm sure you know to copy the section to Base Theme and edit the copied version. Don't edit core files.





Also tagged with one or more of these keywords: sharebar, hook