Jump to content
Sign in to follow this  
wendygordon

move twitter bar

Recommended Posts

wendygordon

I am trying to get the twitter bar to show up as a draggable item in my header and footer areas. I have made the following changes but i cant get it to show up as a draggable section. i copied section.twitterbar.php to platformprobase. i changed the line 'workswith' => array('morefoot') to now be: 'workswith' => array('morefoot','footer','header'), i tried placing the section.twitterbar.php file in a folder in base called sections, and i also tried placing it in the root of the base. still no luck. i dont see the option to drag twitter bar in either header or footer. as always, any help is appreciated. w

Share this post


Link to post
Share on other sites
kastelic

In order to override a section you have to put the template.section.php into the root folder of base and only include the code between

function section_template() {
	
	}

But this won't allow you to change the 'workswith' part. So it seems you would have to create a whole new section (section.twitterbar2.php) and register it in functions.php, change the name of the class, etc. then you can make it fit anywhere you want.

Share this post


Link to post
Share on other sites
wendygordon

Jimmy, thanks, but I think there is another way. Below is a copy of a thread from Adam: # ?· Answer Karma + 406 Adam Munns said 3 months ago Okay let's start over. Get rid of your CSS so the positioning is back to normal. We will have to edit the section.twitterbar.php file Find this line: 'workswith' => array('morefoot'), and make it this: 'workswith' => array('morefoot','header'), When you save and go into the template setup in your PlatformPro Settings it should be a draggable section in the header template area so you can place under you navigation and above your blog content Adam, if you see this, can you please respond? thanks so much. Wendy

Share this post


Link to post
Share on other sites
timlinson

Adam's post is describing how to change the core file directly. If you do it Adam's way, you would change the workswith array inside the original theme file. This is easier, but you will have to change it every time you upgrade. If you want to copy the template to the child theme like you described in your original post, you have to do it the way Jimmy described.

Share this post


Link to post
Share on other sites
timlinson

Adam never said anything about copying to base. He's only talking about how to change the core theme file. If you are basing all of this on what Jim Hill said.. well I don't know what to tell you. That's not how section overrides work, and I'm guessing he just left out some steps whether he knew it or not. If you're not comfortable with the section coding and want to keep figuring out how Jim Hill did it, that's fine. This is how you would go about doing your own twitter section that goes in the header+footer. It really only involves 1 or 2 more edits than what you've already been trying.

  • copy the section.twitterbar.php to the platformbase/sections folder
  • change `class PageLinesTwitterBar` to `class MyTwitterBar`
  • change the workswith array to include 'header' and 'footer'
  • add this line under the `function base_sections(){` line:

`pagelines_register_section('MyTwitterBar', 'twitterbar', null, array('child' => true) );`

Share this post


Link to post
Share on other sites
gayatriom
These are FABULOUS instructions! Thanks so much!

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  

×