retrieve layout (2 posts)

  1. Tim Rogers
    Posted 4 years ago #

    I'm working in comicpress and will have 3 comics in my site, one of them will be a graphic novel so I need to change the layout for that particular category to "graphic novel" , which is a preset in the theme. I have no knowledge of CSS but after reading some posts and tutorials I figure the best way to go would be to make a category template and call the layout, however I can't script CSS, heres the idea...


    if category = "x" {
    layout = graphic novel layout.

    my questions are:
    Is this the best way to go for it? will it work?
    how should I call the graphic novel layout? where can I find out its instance name (or whatever is used to call it).
    If its only a couple of lines, could someone write it for me?

    Thank you.

  2. Tim Rogers
    Posted 4 years ago #

    well I've done this all by myself without knowing CSS.
    I'd like to share it since there's not a clean answer anywhere except: "learn CSS/templates"

    What I did was:

    Open up funcitons.php and find out the name of the layout.
    Copy it close, then open up single.php
    After the get header function write"

    $post = $wp_query->post;

    if (in_category('5')) {
    $comicpress_themeinfo['cp_theme_layout'] = 'lgn';

    of course substitute 5 for the ID for your category and lgn for whichever layout you want for it

    Save and close. Enjoy.

    Thanks to everyone who replied (lol).

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.