ThemeShaper Forums » Thematic

[closed]

Category view don't show the full content

(10 posts)
  • Started 9 years ago by prosit
  • Latest reply from 369music
  • This topic is not resolved
  1. prosit
    Member

    Hi

    Using the Thematic framework, when I click on a category, I want to view all the posts in this category as full posts, with fully working links and individual formatting. What i now see, is the 'excerpt' (is this the same as 'summary'? I'm quite bad in english). I have tried to paste this code in the functions.php:


    function childtheme_content($content) {
    if (is_category()) {
    $content= 'full';}
    return $content;
    }

    add_filter('thematic_content', 'childtheme_content');

    But this does not work. I'm not using a child theme at the moment, maybe I should. Are there someone out there that can help me?

    Posted 9 years ago #
  2. Works here (using a child theme) without any problem.

    Chris

    Posted 9 years ago #
  3. Kyle
    Member

    I know almost nothing about PHP, so I have to ask, how can you do this for multiple categories? Can I place more than one ID in the is_category() part of this code? I tried simply copying and pasting this whole code and putting a different category ID in each, but I got an error for calling for the same function twice or something like that. As I said, I apologize, but I haven't taught myself PHP yet.

    Posted 8 years ago #
  4. function childtheme_content($content) {
    if (is_category('1')) {
    $content= 'full';
    }elseif (is_category('2')) {
    $content= 'excerpt';
    }elseif (is_category('3')) {
    $content= 'excerpt';
    }elseif (is_category('4')) {
    $content= 'excerpt';
    }
    return $content;
    }
    add_filter('thematic_content', 'childtheme_content');
    Posted 8 years ago #
  5. Kyle
    Member

    Thank you very much for the quick response! You guys are awesome.

    Is there any way to make all category archive pages display full posts without adding an

    }elseif (is_category('X')) {
    $content= 'full';

    for each one?

    Posted 8 years ago #
  6. Kyle
    Member

    Thanks! That helped a lot.

    Posted 8 years ago #
  7. 369music
    Member

    Hello,

    This is the question I've been hoping to find an answer to. However, I am a total novice at php, so which file do I need to copy the above code into?
    I am using the street child theme with a modified style.css
    Thank you

    Posted 8 years ago #
  8. even as a php noob you hopefully know not to put PHP into a css file? please try to read just a little about child theming, what that means and how to make one.

    http://www.catswhocode.com/blog/wordpress-how-to-easily-create-a-thematic-child-theme

    or you could also check out the sample child theme that comes with thematic. basically, all CSS rules go into your child's style.CSS and all PHP goes into your child's functions.PHP.

    Posted 8 years ago #
  9. 369music
    Member

    Thank you, this is my first work with a wordpress theme (having previously hard coded html for sites. I had spent the morning trying to find this solution and to learn about child themes, which appear to bring a whole lot of very useful functionality in a simple way to unskilled people like myself. However, I have read pages suggesting overwriting the Thematic files by adding new php files in the child theme, and this seemed confusing.

    I was wondering more if I needed a new .php file or could use the functions. The link is also helpful as it helps me answer another question.

    Thank you again. My site is almost there now.

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.