Jump to content
Sign in to follow this  
jameschoung

Move Category above Post Title

Recommended Posts

jameschoung

I'm having difficulty finding where the code is in the PageLines Framework. I'm using version 2.0, and I'd like to be able to move the category above the post title. So that it might look something like this: ---- category POST TITLE date * comments [ body of the post ] ---- How would I go about customizing the code to be able to do this?

Share this post


Link to post
Share on other sites
Rob
That would require a hook and probably some CSS to assure the placement and styling of the category text. Are you experienced with hooks written into functions.php?

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
jameschoung
Sorry -- I don't know how to use hooks. But I'd love to learn.

Share this post


Link to post
Share on other sites
jameschoung
Ok, just read up on hooks. Looks like I can create something that I place in the child theme's "functions.php" file, that will call back into the hook. I think I get the basic concept. Can you help me with the next step?

Share this post


Link to post
Share on other sites
Rob
Download and install PageLines Customize plugin from the Store. Once installed, FTP into your site. Then, navigate via FTP to wp-content/plugins/pagelines-customize and CHMOD (change permissions) of functions.php and style.css to 777. You may then use Dashboard > Plugins > Editor (select PageLines Customize) to edit those files when necessary. The hook goes into functions.php at the end of the file.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
jameschoung
Thanks -- I know how to edit the functions.php file with a text editor as well. I don't know what hook to call -- which file should I look in to see the name of the hook? I'm assuming that I'd want to remove the current meta clip function, and then add two more, one that goes above the post title and one that goes after. But which hook should I call?

Share this post


Link to post
Share on other sites
catrina
Here is a list of the hooks (look at the items labeled as actions): http://api.pagelines.com/hooks

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
jameschoung
I tried a few hooks, but couldn't get anything over the post title. The closest I got it to go is under the post title, before the content. Is there a hook that's above the post title? If not, should I use a filter hook instead?

Share this post


Link to post
Share on other sites
jameschoung
Never mind about the filter suggestion. I get it now. That's not how I'd get code above the title. There doesn't seem to be a hook to put above the post title. Should I try to do it through a child theme? If so, where would I put the code?

Share this post


Link to post
Share on other sites
Rob
James, I suspect this requires change to one of the section files or templates and I'm unsure which will need the change. Let me flag this to a developer for some input.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Simon
Th action you are looking for is 'pagelines_before_postloop'.

Share this post


Link to post
Share on other sites
jameschoung
Hi Pross -- Thanks for the suggestion, but I tried that hook before. It places the category ahead of [i]all[/i] of the posts. So, it might work for the single post page, though still in a separate frame, but on the main page, it doesn't put the category ahead of every post. It just puts it ahead of the overall content. You can check it out here: www.jameschoung.net Any other ideas?

Share this post


Link to post
Share on other sites
catrina
There might be a CSS hack for this, but it's probably not the most elegant solution.

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
jameschoung
How would that happen? But couldn't there be a way to insert a line of code in a child theme? In a simpler Wordpress theme, I might be able to find where to put it. But I looked at the includes/class.posts.php and wouldn't even know where to begin.

Share this post


Link to post
Share on other sites
jameschoung
I have Base Theme 1.0.2 installed.

Share this post


Link to post
Share on other sites
kastelic
Have you tried pagelines_loop_before_post_content ?

Share this post


Link to post
Share on other sites
Danny
@jameschoung Send me an email at danny(at)pagelines.com and I will send you a section, I've tested it and it works but my PHP skills are legendary for being rather poor.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
jameschoung
@Kastelic -- yes, and it places the category under the metabar (but over the text of the entry) instead of over the title. @Danny -- thanks! I'll send you an email.

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  

×