Jump to content
Sign in to follow this  
eljustino

Create different template for specific category?

Recommended Posts

eljustino

Thought I knew how to do this but apparently not... Essentially, I want to have a different layout for one specific category page. Like I'd want to use the magazine layout mode for that category page, but use the blog layout mode for others. Is that possible?

Share this post


Link to post
Share on other sites
eljustino

Thanks, Kate! That's exactly what I was thinking of... I just switch between Drupal and Wordpress pretty often and tend to sometimes gets functions/features from each mixed up in my head. Is there anything special that one needs to do to use category templates with the PlatformPro theme?

Share this post


Link to post
Share on other sites
bryan-hadaway

Probably not as it's back-end and deals with WordPress where a theme mostly dictates front-end style. Give it a try and if you run into any trouble we'll be here. Thanks, Bryan

Share this post


Link to post
Share on other sites
heroescourse

Using Platform Pro, which file do I post the following (from Wordpress) into? <?php if (is_category('Category A')) { ?> <p>This is the text to describe category A</p> <?php } elseif (is_category('Category B')) { ?> <p>This is the text to describe category B</p> <?php } else { ?> <p>This is some generic text to describe all other category pages, I could be left blank</p> <?php } ?> Thanks!

Share this post


Link to post
Share on other sites
bryan-hadaway

Forwarding to developers. Thanks, Bryan

Share this post


Link to post
Share on other sites
Sourena

Another solution: 1. Create a page and name it the category you want to show. Copy the page's ID. Leave the page blank and save it 2. Install and activate "Query Posts Plugin" and "Widget Logic": http://wordpress.org/extend/plugins/query-posts/ http://wordpress.org/extend/plugins/widget-logic/ 3. Go to PlatformPro settings. In the "Template Setup" select "Page Content Area" and add "Content Sidebar" to your page layout. 4. Go to Appearance > widgets. Add "Query Posts" to your "Content Sidebar". Use "Query Posts" to show the category you want to appear in the page. 5. At the bottom of the widget add this line to Widget Logic box:

is_page('YOUR_PAGE')

Replace "YOUR_PAGE" with the page's ID. The category page is ready. Add it to your menu.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
bryan-hadaway

Did Sourena's solution work for everyone or are we still troubleshooting this? Thanks, Bryan

Share this post


Link to post
Share on other sites
heroescourse

Shelved it myself as well for now! Thanks! Stephen

Share this post


Link to post
Share on other sites
Sourena

Actually I tried my own solution and had an issue! "Query Posts Plugin" works fine if you want to display a certain number of posts from a certain category but it does not produce a "paged" result, and that is what one need in a category page. So it means we still need to know how we can create a customized "category.php" in PlatformPro. Normally one should be able to copy "page.php", customize it for a category page, and saves it as "category.php". But in the case of PlatformPro the process is more complicated since the "page.php" page does not contain the regular codes.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
bryan-hadaway

Going back to the original purpose, styling a specific category differently... if you can describe to me to what extent you like the page to be different from other perhaps some simple CSS styling will do. Thanks, Bryan

Share this post


Link to post
Share on other sites
Sourena

I want the category page to look like the blog page. With a thumbnail image on the side and excerpt next to it. Also the other reason I want to know how to change the category page was to customize the look in an online magazine. If I can customize the category page I can show the latest post in a different box and show the rest by setting them to offset=1. Also, I need to have control over other taxonomies but that is another subject. Maybe I have to create a new post here for that.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
bryan-hadaway

I can help with the CSS for sure if you provide me the link to the category page in question... Other than that, PHP customization would be involved and I'm not sure to what complexity and if it could be provided in the support forum. Thanks, Bryan

Share this post


Link to post
Share on other sites
Sourena

Thanks Bryan. I do not expect the Pagelines support forum to customize the websites for me. What I need to know is how I can do it myself, or how I can ask a PHP coder to do it for me. Normally a WordPress coder can customize a category page or create a new a template page easily but in the case of Platform Pro it becomes complicated because the theme's structure is complicated. All I need to know is that how one can create a new category page, taxonomy page, or new template page in Platform Pro so I can do it myself.


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
Sourena

cmunns, I know query posts function adds paged results if I modify the parameters, but I am not working with the codes but with a plugin called "Query Posts". That plugin does not produce paged results or maybe I do not know how to set it up: http://wordpress.org/extend/plugins/query-posts/


alefba.us

Web Development & Design for Right-to-Left languages

Share this post


Link to post
Share on other sites
danabrunetti
I am not working with the codes but with a plugin called "Query Posts". That plugin does not produce paged results or maybe I do not know how to set it up: http://wordpress.org/extend/plugins/query-posts/
We too have tried using the Query Posts Plugin as well as others and am having a ton of trouble trying to get them to paginate. Query Posts and others solve part of the "Category Page" dilemma (using Pagelines to customize pages meant to house different categories of posts) that Sourena and others are facing but Sourena is right in that it does accomplish the key goal of allowing a Category of blog posts paginate. This is crucial to our site design and holding us back for the moment, can any fixes to the pagination section or lines of CSS be suggested by anyone who has solved this issue?

Share this post


Link to post
Share on other sites
catrina

Hm, the only category template solution I know of is this one: http://mattmedia.net/2007/10/09/how-to-set-up-custom-wordpress-category-templates-in-four-easy-steps/ But I'm not sure how it will fare with PlatformPro and whether or not it suits your needs...


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
k8perkins

Same problem - the reason I purchased the pro version is that I was looking for a fix for this. Would like my "news" posts and "portfolio" posts to have different setups. Should be included in updates please!

Share this post


Link to post
Share on other sites
mediafirm

I'm in the same boat. I've separated "News" and "Blog" categories as Menu items and want different content to appear in the sidebar for each "posts page" as it were. I would have simply created a "categories.php" and used similar settings with different sidebar widgets, but PlatformPro (the dev version I think) doesn't want to play along with that second "posts page" type. I'd prefer not to create pages and deal with additional plugins and, if possible , simply use a "Posts Page" template and an alternate "Categories" template somehow. Any suggestions would be appreciated.

Share this post


Link to post
Share on other sites
cmunns

Copy section.postloop.php into the root of your PlatformBase folder. Then in the section_template function add a conditional to handle the new category page ` function section_template() { if (is_category()): get_template_part( 'category' ); else: //Included in theme root for easy editing. get_template_part( 'template.postloop' ); endif; } ` Then create a category.php file also inside the root of your PlatformBase file and edit however you like ( you probably can copy elements over from the postloop as reference )

Share this post


Link to post
Share on other sites
mediafirm

Thanks for the tip. Is it possible to do it in such a way as to have that Category added to the PlatformPro "Templates" list housed in the UI? Or have I missed something?

Share this post


Link to post
Share on other sites
Andrew

Hey Elias, This is a feature/functionality we are working on for future releases :) Andrew

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  

×