customizing category pages

Community Forums Forums Design Tips and Tricks customizing category pages

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  braddalton 1 year, 4 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #29213

    greenecon
    Participant
    Post count: 24

    I want to use wp-tiles for category pages.  Totally confused on how to do this.  Not sure where to put the code they recommend.  Looked all over Word Press and Studio Press.  Can’t imagine Im the first person to want a custom category page!  Below’s the code they recommend:  (where does it go?)  The short code we are using on pages is:

    [wp-tiles Template=TGE posts_query='category=328']  Where template is one we set up. then we pick the category. Worst case we can make a bunch of pages with the code for the category and then make menus to link the pages.  Looked to see if I could put this short code into genesis simple hooks but couldn’t find one that looked like it was about the category pages.  Any ideas? We use genesis and generate.  Here’s and example of what the pages look like:  http://www.thegreeneconomy.com/home/testv1/
    <?php get_header(); ?>

    <section id="primary" class="site-content">
    <div id="content" role="main">

    <?php if ( function_exists ( 'the_wp_tiles' ) ) the_wp_tiles(); ?>

    </div><!-- #content -->
    </section><!-- #primary -->

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    #29316

    braddalton
    Participant
    Post count: 8873

    What you’ll need to do is add this code to a custom function which includes a conditional tag for your category archive pages.
    [php]
    if ( function_exists ( ‘the_wp_tiles’ ) ) the_wp_tiles();
    [/php]

    Use the conditional tag for category pages, is_category() http://codex.wordpress.org/Conditional_Tags#A_Category_Page

    There’s no template files for category pages in the child theme which is better because you need to use custom functions.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #31295

    greenecon
    Participant
    Post count: 24

    This is what I understand from what you wrote.

    I put in my functions.php

    if ( function_exists ( 'the_wp_tiles' ) ) the_wp_tiles();

    Not sure where the following goes: ‘Use the conditional tag for category pages, is_category()’

    I am thinking this goes on the category page somewhere, so would be ‘is_category(12)’ for our news category.  Since we want to use on many category pages, do we customize each?  Thanks.  t.

    #31302

    braddalton
    Participant
    Post count: 8873

    I don’t think that code will work.

    I would ask the plugin developer for the code which works with Genesis child themes functions.php file as there are NO template files you can paste the line of PHP into.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #31341

    greenecon
    Participant
    Post count: 24

    Totally confused.  I was trying to understand what you recommended. Are you suggesting that what you thought would work won’t work?  Or that I totally misunderstood what to do with the information you provided.

    Your info below:::::::::

    What you’ll need to do is add this code to a custom function which includes a conditional tag for your category archive pages.

    if ( function_exists ( 'the_wp_tiles' ) ) the_wp_tiles();

    Use the conditional tag for category pages, is_category() http://codex.wordpress.org/Conditional_Tags#A_Category_Page

    There’s no template files for category pages in the child theme which is better because you need to use custom functions.

    WordPress Developer & Consultant
    Brad Dalton @ WP SitesClick Here to Get Genesis Child Theme Tips Delivered.

    #31357

    braddalton
    Participant
    Post count: 8873

    You’ll need a custom function written to run the PHP function for the plugin you want to use to style your category archives page. The function will need a conditional tag so it only executes on the pages you want it to.

    Sorry but i cannot read the code very well when its not pasted correctly. Please use the PHP opening and closing shortcodes when pasting PHP code in posts. Learn more about FAQ No.5

    That code won’t work unless it a added to a custom function correctly.

    What i suggest you do is ask the plugin devloper for tha custom function which works in your child themes functions.php file because your theme doesn’t use category archive templates.

    When you get that from them, i’ll write it into a cutsom function with conditional tag for you so its works on your theme.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #31366

    braddalton
    Participant
    Post count: 8873

    Another option is to use the shortcode in a custom function.

    Here’s a sample of what the code will look like https://gist.github.com/braddalton/5247701

    You can change the conditional tag, add category i.d’s to the conditioinal tag and change the Genesis hook location.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #31605

    greenecon
    Participant
    Post count: 24

    I apologize for being such a git, but I”m not sure what you think I should do with this code. [pardon the language].

    Simple hooks has a section that seems like it would be a good place to place your code, but not sure what part of the code to put.  [image below].  Assuming if this was the right to code to put here, then we’d just check the ‘execute shortcodes’ , but not php one.

    We put in in our test site functions.php. It didn’t break the site, but wp-tiles isn’t working there anyway.  We have little to no content which I am assuming is the problem and trying to fix that.  Anyway, where does this code go?  Tana

    #31681

    braddalton
    Participant
    Post count: 8873

    Paste it at the end of your child themes functions.php file.

    This is sample code which needs to be modified:

    What i suggest you do is ask the plugin developer for the custom function which works in your child themes functions.php file because your theme doesn’t use category archive templates. ref

    I would not use a plugin if its not well supported and cannot communicate with the developer.

    Have you seen this plugin?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.