Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

Adding different templates for categories

  1. Hello hybrid friends,

    I've found a great plugin for organising posts in an alphabetical order http://www.nateomedia.com/wares/downloads/wordpress/wp-snap/

    Now I'd like this plugin only on some of my categories. From what I understand as per the wordpress codex we can set up templates for different categorys, which meand I'd be able to use this plugin for my posts which are just listing various companies.

    I don't require it to work on all of the categories as there it's best to have the latest news at the top.

    My question is how do I set up a category template.?

  2. The plugin site you list actually links to resources at Wordpress.org Codex.

    Edit the category templates your Theme uses, such as category.php, and add the following code above the start of the Wordpress Loop:

    <?php if (function_exists('wp_snap')) { echo wp_snap(); } ?>

    Note: For the Plugin to work, you must have access to edit your WordPress Theme files. You must also have a category.php template file in your WordPress Theme. If you do not, you can create one following the instructions on the WordPress Codex for creating a category template file.

    To understand where and how to include the code in a new child theme specific category template you may have a look at:
    http://codex.wordpress.org/Category_Templates
    http://codex.wordpress.org/Stepping_Into_Templates#Special_Template_Files

    Do not edit the Hybrid default category template.

  3. You must be a logged-in exclusive member to view this reply.

  4. Thanks for the answers guys. I sure appreciate it even though sometimes I have no idea what you're talking about ;-)

    I have no idea what a loop is or a hook!

    I've got the plugin working I added this to the category.php file

    Can't seem to get the back tick thing working - sorry.

    It works like a charm except I don't want to switch on for all the categories if possible.

  5. You must be a logged-in exclusive member to view this reply.

  6. Okay I'm gonna try even though I'm terrified of the functions file which has caused me white death in the past.

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Core Framework (54 posts)
  • Hybrid Theme (22,711 posts)
  • Bliss Theme (255 posts)
  • Options Theme (10,362 posts)
  • Visionary Theme (767 posts)
  • WordPress (144 posts)
  • WordPress Plugins (2,146 posts)
  • bbPress Themes (308 posts)
  • General Discussion (5,572 posts)
  • Critical Theme (0 posts)
  • Hybrid News Theme (132 posts)
  • Hybrid Original Theme (26 posts)
  • Leviathan Theme (16 posts)
  • Life Collage Theme (9 posts)
  • Old School Theme (3 posts)
  • Outline Theme (108 posts)
  • Skeleton Theme (40 posts)
  • Structure Theme (2,768 posts)
  • Members Plugin (2 posts)
  • Cleaner Gallery Plugin (14 posts)
  • Get the Image Plugin (3 posts)
  • Message Board Plugin (0 posts)
  • Widgets Reloaded Plugin (0 posts)
  • Breadcrumb Trail Plugin (0 posts)
  • Query Posts Plugin (80 posts)
  • Hybrid Hook Plugin (7 posts)
  • Hybrid Hook Widgets Plugin (0 posts)
  • Hybrid Tabs (5 posts)