ThemeShaper Forums » Thematic

Custom Post Template

(3 posts)
  • Started 9 years ago by NativePaul
  • Latest reply from Manuel
  • This topic is resolved
  1. Hi there

    I'm playing around with Thematic Framework and Chris Wallace's Gallery child theme on a local testing server. I'm still trying to wrap my head around using Thematic, I find some things easier and some easy things very complicated.

    I want certain posts to have a different layout to the Gallery default (basically just a standard post without the large image on the right).
    The easy solution would be the Custom Post Template plugin:
    http://wordpress.org/extend/plugins/custom-post-template/

    The plugin doesn't seem to work. I'm assuming it gets ignored by the way Gallery calls thematic to create a single post template.

    If I can use the plugin, then I'm not sure what code to put in the new post template file. Should I write it into functions.php?

    Any help would be appreciated.

    Posted 9 years ago #
  2. I haven't found an answer to my question, but I did find a solution to my problem.

    It seems like a messy way to do things, but it gets the job done. This was inspired by hacking myspace css to create custom layouts.

    I wanted some posts to display at the full width, without a large gallery image. The easiest way to achieve this was to just add some CSS to the actual post (in html mode).

    <style>
    .single .artwork-container{display:none;}
    .single .entry-content{ margin: 20px 0 0 20px; width: 900px;}
    </style>

    The first line hides the artwork container.
    The second line resizes the post content by reducing the left margin and increasing the width of the container.

    If anyone can offer a better solution, I'd love to hear it.

    Posted 9 years ago #
  3. No clue about the custom template thing, which would probably be the proper way to do it, but if this is only for a few posts (or taken as a temp solution untill you get the custom template running) then this should do the trick:

    Thanks to Thematic, your body class already contains the slug of the post you’re viewing.

    So if your post title is “More Text, less Art”,
    then your slug would probably be “more-text-less-art”,
    which means that one of your body class names is “slug-more-text-less-art”.

    So just add the following to your childthemes style.css:

    .slug-more-text-less-art .artwork-container{display:none;}
    .slug-more-text-less-art .entry-content{ margin: 20px 0 0 20px; width: 900px;}
    Posted 9 years ago #

RSS feed for this topic

Reply

You must log in to post.