Community Forums › Forums › Archived Forums › Design Tips and Tricks › Wellness Pro – Display Post Title & Image on Category Pages
Tagged: category page, category.php, wellness pro
- This topic has 10 replies, 2 voices, and was last updated 7 years ago by
BlakeN.
-
AuthorPosts
-
January 4, 2018 at 8:50 pm #215107
BlakeN
ParticipantI'm looking to display only post titles with a featured image for posts on my category pages. I would possibly also like an excerpt but would settle for either.
By default it displays full text but I'm looking to have a featured image with the title below it in a clean format.
I've created two dummy posts on this page for an example.
https://thinkeattrain.com/articles/mind/parenting/It need to be in a clean format like the front page of Brunch Pro.
https://my.studiopress.com/themes/brunch/#demo-fullAny help is greatly appreciated!
https://thinkeattrain.com/articles/mind/parenting/January 4, 2018 at 8:56 pm #215108Brad Dalton
Participant1. Create a category.php or archive.php file in your child themes root. WordPress will use the Template Hierarchy to load the file.
2. Add code to the file to add or remove functionality and markup you want or don't want.
January 4, 2018 at 8:56 pm #215109Brad Dalton
ParticipantJanuary 18, 2018 at 9:01 am #215492BlakeN
ParticipantBrad thanks for the feedback. I did as specified in the post but the category pages are still rendering the same.
Outside of the directions in the post is there something else it could be?
See screenshot:
https://thinkeattrain.com/wp-content/uploads/2018/01/Screen-Shot-2018-01-18-at-9.56.21-AM.pngJanuary 18, 2018 at 9:14 am #215493Brad Dalton
ParticipantI renamed the page_landing.php to archive.php and category.php and it loads on category archives.
Maybe caching or a custom function you added like template_include.
January 18, 2018 at 9:42 am #215494BlakeN
ParticipantTried that and it did not work either.
I'm not currently running any caching installs or have added any custom function. I've set the site up recently and for the most part it's a base install.
https://thinkeattrain.com/wp-content/uploads/2018/01/Screen-Shot-2018-01-18-at-10.40.38-AM.png
January 18, 2018 at 11:52 am #215499Brad Dalton
ParticipantJanuary 18, 2018 at 1:39 pm #215504BlakeN
Participant/public_html/wp-content/themes/wellness-pro
In the root theme folder as the post instructed. Same location as style.css, front-page.php, etc.
January 18, 2018 at 5:24 pm #215515Brad Dalton
ParticipantI have tested this twice and both times it works perfectly.
See the WordPress Template Hierarchy https://developer.wordpress.org/themes/basics/template-hierarchy/#category
Note : You will need to add code to the custom archive template to add or remove default hooks and markup
Example : Add the following code to the file :
// Remove site header elements. remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); remove_action( 'genesis_header', 'genesis_do_header' ); remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
January 31, 2018 at 8:38 am #215911BlakeN
ParticipantBrad I've been playing with it and nearly have it there. Initially I did not use the genesis archive page php to start with and I'm not sure what was missing but it seems to be on track now.
Thanks again for all the help.
January 31, 2018 at 8:46 am #215912BlakeN
ParticipantThis reply has been marked as private. -
AuthorPosts
- The topic ‘Wellness Pro – Display Post Title & Image on Category Pages’ is closed to new replies.