Community Forums › Forums › Archived Forums › Design Tips and Tricks › Beautiful Pro Custom Category Template
Tagged: beautiful pro, category page
- This topic has 4 replies, 2 voices, and was last updated 6 years, 8 months ago by MediaServices.
-
AuthorPosts
-
July 19, 2017 at 1:25 pm #209306MediaServicesParticipant
I've been tasked with creating 2 pages on a Beautiful Pro themed site where I could display a subset of articles from a category followed by a "Read More [Category] Articles" that would be slightly different per page due. For example, I was tasked with taking the 'teasers' for 3 articles from the http://chswomeninbusiness.com/category/business/ category and placing them on a page followed by a per-page button/link saying "Read About More [Category Name]".
The first working idea I had was to assign a 'featured women in business' category an assign the 3 articles to that category also. Then creating a simple category template (https://codex.wordpress.org/Category_Templates) like category-ID.php or category-slug-name.php file for that featured category and add my custom "Read More" link below that.
As I look through /wp-content/themes/genesis/ and /wp-content/themes/beautiful-pro/ there is no category.php, archive.php I can find and I don't seem to be able to use /wp-content/themes/genesis/index.php since I can only place my custom "Read More" link before or after
genesis();
. So I installed Genesis Simple Hooks and added the code to display my per-page button/link to more category articles for the 2 category IDs and this works, but it seems 'messy' to me.1) Is there a better and neater way?
2) To create a category-ID.php or category-slug-name.php what file would I copy as the template file?
– George (MediaServices)
July 19, 2017 at 10:21 pm #209326Brad DaltonParticipantJuly 20, 2017 at 10:24 am #209338MediaServicesParticipantBrad, thanks for the reply. From your response I gather you think that the way I chose to handle the requirement to have 3 of the articles from any given category n a separate 'page' with a link to read all of the rest of them is the best way to go?
With that assumption in mind I previously read your tutorial when googling, but for me it fell apart right here:
Simply copy either the archive.php or category.php file from your parent theme and paste it into your child themes folder then change the file name if needed.
As I mentioned above I was unable to find a category.php or archive.php in either /wp-content/themes/genesis/ or /wp-content/themes/beautiful-pro/.
So, I can't open an existing category.php or archive.php file and save it as category-23.php then find a place to add:
echo '<a href="http://chswomeninbusiness.com/category/business/"><strong>Read About More Women in Business</strong></a>';
So, I went down your page and looked at your archive.php Gist and I see code that probably does some really cool stuff, but I have no idea what. I can see that you're example essentially changes 'genesis_post_info' value from 12 to 8 and 'genesis_do_post_image' value from 8 to 2, but I have no idea what that does or how it would help me add a link. Maybe I need a more basic tutorial?
– George (MediaServices)
July 20, 2017 at 5:52 pm #209356Brad DaltonParticipantAnother option is to add a widget area to a page and use the Genesis Featured Posts widget in the widget area.
Or
You can use a template coded to display 3 posts from different categories.
July 21, 2017 at 8:12 am #209390MediaServicesParticipantScore, booyah! Brad that sounds great! We have another StudioPress site running Genesis Featured Posts widgets and Genesis Featured Pages widgets on the home page. Great idea!
Now I just need to find a tutorial to add Widgets to a page. Looks like your tutorial here is what I need. Thanks!
– George (MediaServices)
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.