ThemeShaper Forums » Thematic

[closed]

Styling Category Archives

(8 posts)
  • Started 10 years ago by liz_eff
  • Latest reply from em hr
  • This topic is not resolved
  1. Hey there,

    I'm using a child theme for Thematic, in which each page displays a category archive that corresponds to the page. For example, the R&D page explains the R&D division and displays truncated posts in the category "R&D". (I was stuck on that problem for days before I saw this thread: http://forums.themeshaper.com/topic/posts-inside-the-pages-and-subpages)

    Now, I'd like to style the post listings to show a thumbnail (which I upload and include in the "excerpt" section when creating or editing the post; it appears within the class "entry-content" in the category archive section) alongside the entry-title and entry-meta.

    So, I need to create a filter hook in my functions.php page that adds a div around entry-content, entry-title, and entry-meta, which i can style to set the first class to float to one side and the latter classes to float to the other side.

    The catch is that I also need to be sure that each of these classes don't float around when one selects and views a single post in full.

    Any help on this will be appreciated, as my brain is fried.

    Thanks!

    Posted 10 years ago #
  2. Also, I have yet to find a plugin that seems worthy enough. I'd prefer to tackle this issue using filter hooks in the theme's functions file.

    Posted 10 years ago #
  3. Hi liz-

    In terms of a plugin solution for pulling an image from a post or a custom field Justin Tadlock's get the image plugin is first class.

    Here is a duscussion that shows an example of adding plugin functionality to the entry/post meta:

    http://forums.themeshaper.com/topic/editing-entry-meta-038-post-utility-items

    I'll look at the other discussion you've mentiuoned here and see if I have anything to add.

    -Gene

    Posted 10 years ago #
  4. Thanks.

    I'm actually just trying to add a div tag around the category archive listing so that I can add css for #category .post-meta {}, for example, and not affect .post-meta on the single post.

    I know it's as simple as any filter hook... this works:

    //adds a div to postheader
    function childtheme_posttitle($posttitle) {
    return '<div id="excerpt_layout">' . $posttitle . '</div>';
    }
    add_filter('thematic_postheader_posttitle','childtheme_posttitle');

    but I want to wrap $posttitle, $postmeta and $post in the div. I also need to add a conditional like,

    if (is_page() || is_category())

    but it's just not all falling together.... you seem to have a little more finesse. can you help?

    Posted 10 years ago #
  5. Hi liz-

    If you're just using a wrapping div for the sake of styling alone, I don't think it's necessary. Thematic generates dynamic body classes and you can use the body class prepended to any other selector for specific styling.

    .category .entry-meta, .category .entry-title {background:yellow}

    -Gene

    Posted 9 years ago #
  6. I'm trying to use the Get-The-Image plugin to work so that I can display thumbnails for certain categories and tags, but I'm not sure how to call it or where.

    Posted 9 years ago #
  7. Ridgley's question is finding further discussion here:

    http://forums.themeshaper.com/topic/get-the-image-for-category-038-tag-archives

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.