Jump to content
Sign in to follow this  
ksnyde

Hook away the Post Header

Recommended Posts

ksnyde

Hi guys, I've created a Custom Post Type called "sensors" and when I go to the Single page view (aka, http://lifegadget.co/sensors/xyz) I want the normal blog header that states the title, post time, author, etc. to be removed. The way I've chosen to go about it -- and maybe this is not the best way -- is to create a new Section called SensorSingle and have it mimic the existing "Content" section but to leave out this part of the page. But on inspection the Content section just calls the function:

pagelines_template_area('pagelines_main', 'main'); 

I started to see how deep the rabbit hole goes and followed the call into class.actions.php but I'm starting to get lost. :^( What's the best way of achieving this? I don't mind mucking about in PHP if there's a better answer there than just in config choices. I've included a screen shot of the area of the page I'm trying to remove: screen shot

Share this post


Link to post
Share on other sites
Simon
Use filters ;) 'pagelines_post_title_output' Or better 'pagelines_post_header'

Share this post


Link to post
Share on other sites
ksnyde
@Simon, I was heading down that path and I do get the action and filter hooks framework to some degree but if I'm not careful i get a little lost. As a first step I went to the store and downloaded the Actionmap plugin. I thought that was pointing me to either "the_loop" or "pagelines_loop_before_excerpt" ([url="http://www.flickr.com/photos/14261777@N00/6869253146/"]screen shot[/url]) How did you come up with the "pagelines_post_header" and where can I get some example code and/or documentation?

Share this post


Link to post
Share on other sites
Simon
The action map will only show 'actions'. Filters are a different beast. Seeing as you want to completly hide the header you could use this: [code]add_filter( 'pagelines_post_header', '__return_false' );[/code]

Share this post


Link to post
Share on other sites
ksnyde
Well, that was easy. Thanks. :^) Ken p.s. where would I go to see the reference code that it is using for this block of HTML? I'm interested in seeing the reference to the PHP variables names, etc. before it's all converted into boring HTML.

Share this post


Link to post
Share on other sites
Simon
http://phpxref.pagelines.com/nav.html?index.html

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  

×