Jump to content
Sign in to follow this  
historicshed

Page Titles

Recommended Posts

historicshed

How would I place the page title up in the heading area (in Platform Pro)instead of in the main content area? Is that something I would use a hook for (which intimidates me greatly since I haven't used them yet)? Or is there another way to do it (in a full width sidebar below the heading perhaps)?

Share this post


Link to post
Share on other sites
timlinson

Where exactly do you mean when you say "heading" area? By default the page's title is displayed at the highest point in the content area, so you want it above the navigation then? up into the site logo area? This does sound like the job for a hook, something like this in platformbase/functions.php: ` function jo_title_header() { if(is_single()) echo the_title(); } ` `add_action('pagelines_branding_icons_end', 'jo_title_header');` Adam gives a quick rundown in this video about the basics of where everything goes: http://www.pagelines.com/docs/base-child-theme

Share this post


Link to post
Share on other sites
ricardo

It's quite simple using a hook, it all depends on where you want to add the title. This code for example, adds the title to the top of the feature:

add_filter('pagelines_inside_top_feature', 'title_in_feature');
	
	function title_in_feature(){
	echo the_title();
	}
	

(btw, this goes in your functions.php) You can see the appropriate hook in PlatformPro Settings > Template Setup and then expanding the Advanced Setup in the bottom of the desired section. Ricardo

Share this post


Link to post
Share on other sites
historicshed

Thank you both of you. I will play around with this and see if I can get it to work. Since the banners and boxes can push page content (with title) below the fold I thought this might help let people know which page they're on.

Share this post


Link to post
Share on other sites
ricardo

Hi! I only saw Tim's answer now (I guess he answered while I was writing) but his code is better because it first checks if the current page is a single Post/Page before running the function, meaning: you won't get titles in the heading in pages like category/tag/author/etc archives, attachments and so on... You said something that intrigued me: "I thought this might help let people know which page they're on". Can I ask why do you want to move the title to that area? Regarding banners and boxes, IMO that's not a solution. You cannot call any of them directly so you would need to create a box or banner set first, then create the box or banner and classify it in that set, then finally you can call the set from the post/page. Ricardo

Share this post


Link to post
Share on other sites
historicshed

Sorry, didn't see the last post until today. Regarding why I am considering moving the page title to the top: When I use banners or boxes above my page text, the title gets pushed too far down the page (often below the fold). I really just need to move the title to above the boxes or banners (or just below the navigation to look proper.

Share this post


Link to post
Share on other sites
Kate

Hi Jo-Anne, I saw in your previous post you said you were going to play around with it. Were you able to get something to work? Or, not yet?

Share this post


Link to post
Share on other sites
historicshed

I did get it to work but then decided to get rid of all banners, boxes, etc. so I no longer needed to move the title.

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  

×