Jump to content
Sign in to follow this  
npetten

Adding content above post list

Recommended Posts

npetten

I would like to add content to a typical post list page. For example, if I select a category and then it lists all the posts under that category, I would like to add content (text/image) at the top of the page that is relevant to that category. I can imagine that this can be done through editing the php files directly, but I would like this website to be easily customizable by the client. Is there a way to do this through the native WP panel or Pagelines options? Thanks the website is: new.wici.ca

Share this post


Link to post
Share on other sites
catrina

There are no WP or PageLines settings for customizing the category page. Making edits to the PHP files is possible, but I'm not sure how well that will go over if the client is unfamiliar with how to make changes when needed.


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
npetten

I found this resource in the WP codex: http://codex.wordpress.org/Function_Reference/category_description It basically tells me that I can add a description to a category and then show it on the category post page. It instructs me to add some code to the post .php file (for example, archive.php) but I can't find the .php file that relates to categories. Does that make sense or should I clarify more?

Share this post


Link to post
Share on other sites
cmunns

I would use a hook...read up on them in the documentation. Something like this would work ` add_action ('pagelines_inside_top_theloop','cat_desc'); function cat_desc(){ if (is_category()): echo category_description(); endif; } `

Share this post


Link to post
Share on other sites
npetten
Thanks for the advice. Where would I place that hook?

Share this post


Link to post
Share on other sites
catrina
All hooks need to be added to the functions.php file in the child theme PlatformBase (as shown here: http://www.pagelines.com/docs/base-child-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

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  

×