ThemeShaper Forums » Thematic

Page with single category of posts

(5 posts)
  • Started 11 years ago by Devadaru
  • Latest reply from Devadaru
  • This topic is resolved
  1. Devadaru
    Member

    A method is described here http://wordpress.org/support/topic/131200?replies=6 by which one can make a page that calls up only posts of a certain category. This method requires making an additional page template.

    Is there a way to do this in thematic using only the child theme?

    Posted 11 years ago #
  2. I think this is pretty straight forward, though not as clean as it might be.

    You can simply copy the category.php file in the Thematic theme folder to your child theme folder and rename it to category-catid.php where catid is the ID number of the category. For example, I have a custom template for one category, id no. 2013 in the database so my file is named category-2013.php and is only used for that category id.

    In fact, with Wordpress 2.7 and above, when you are using a child theme, it looks into the child theme directory and overrides the parent themes templates with anything you have in there.

    I hope this is helpful.

    Dennis

    Posted 11 years ago #
  3. Devadaru
    Member

    Thanks, Dennis. This certainly sounds easy. But as it turns out not as simple as I had hoped. The plugin page links to is an easy solution, but the page then opens with a "category archives" note at the top. I guess one has to do some php editing of the custom category page to make it look like a page.

    I removed the title; but now one doesn't get the title when clicking on a category in the category list either... Any further suggestions?

    Posted 11 years ago #
  4. Hi,

    you could filter the page title away:

    function no_page_title($content) {
      if (is_category(xx)) {
        return '';
      } else {
        return $content;
      }
    }
    add_filter('thematic_page_title', 'no_page_title');

    Add this code to your child theme's functions.php and change 'xx' to the needed category id.

    Haven't tested it but should work.

    Cheers,

    Chris

    Posted 11 years ago #
  5. Devadaru
    Member

    Thanks, I look forward to testing it.

    Posted 11 years ago #

RSS feed for this topic

Reply

You must log in to post.