Jump to content
Sign in to follow this  
mellanedavies

Add PHP code for Sharebar to Post template

Recommended Posts

mellanedavies

I am trying to manually ad php code to add "sharebar" plugin to all posts on my site and I am wondering where to put the code.

Share this post


Link to post
Share on other sites
catrina

There is a sharebar that comes default with the theme (accessible via PageLines Settings > Blog And Posts), so you don't need a plugin to add it to your posts... unless this is a sharebar you'd prefer to use rather than the one that comes with the theme.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
mellanedavies

Yes, we prefer to use the Sharebar plugin because of the placement, I am happy with the way it works the problem that I am having is that it has only automatic or manual setting which means it shows up on all posts and pages or I have to include PHP in template file. My issue is in using banners on a page it seems that the plugin is than assigning the sharebar to the banner - my thought is because it is a custom post type - and I have no way to tell it not to do that so I end up with the sharebar in the middle of the banner on the middle of the page. I am thinking if I just use the manual option and place the code for the plugin in the Single Post template as well as Page template this will allow me to use banners without the bar attaching to the banner.

Share this post


Link to post
Share on other sites
kastelic

You can use a hook to insert any PHP code anywhere you want. Here is a doc on that: http://www.pagelines.com/docs/base-child-theme If that seems daunting to you, it might be easier to hide the unwanted instances with CSS, for example(needs to be adjusted for actual elements used by the plugin):

	.banner_container .share-plugin-container{
	display:none;
	}
	

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  

×