Support » Themes and Templates » One – Two Columns

  • Hello!

    I would like to know how to change the number of column for certain pages. I need to make my MicroWiki pages comes with only one column, but I also need two columns for my normal pages.

    Thanks you for any answers…

Viewing 15 replies - 1 through 15 (of 30 total)
  • try creating 2 separate themes and a theme switcher

    take a look at how it’s done in the default theme. I believe that separate pages, are only 1 column, while the main blog is 2.

    But by establishing this, I still need to switch the theme everytime I go to the actual pages… This doesn’t work pretty well… or is there a specific configuration that I can edit to automatically change it? If there is, it would be just perfect!

    I have tried to look around at the codes, but gave up. Nothing specific found unfortunately… There is just this string that I’m considering might be the source:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    And I have no experience in modifying PHP codes nor StyleSheet’s…
    Btw, I have Obsidian2 theme installed, which is the modification of Manji (by his partner)… If anyone that are experienced in using this theme can help? Thank you for your generous support btw.

    actually, if you look at the default theme, you’ll notice a single.php, that’s where the one column comes into play. In the normal view, the div is: < div id=”content” class=”narrowcolumn”>

    while in single.php the div is:
    <div id=”content” class=”widecolumn”>

    there’s 2 sets of css, one narrowcolumn and then one widecolumn. just define the sizes you want, and you’ll be able to have your 1 column vs 2 column.

    so you’d have to add classes to your current theme, and then add css as well.

    Hmm… sorry but I still don’t get what you mean (I have no experience in coding this kind of things)… Add classes, meaning?

    So, here is the case, I want my pages, such as:

    -> http://domain/myblog/index.php?static=wiki&page=HomePage&do=&label=

    -> http://domain/myblog/index.php?static=wiki&page=PageList&do=&label=

    and others that are covered within it… to come up with only one column.
    By adding the classes, you mean I have to put some strings to my index.php page so that those pages will only have one column? Or.. do I have to create another .php page? If so, how to do it, and how would the pages use that php file? Sorry if I’m bothering you too much. I appreciate your answers. Thank you.

    heh, first put up links that actually goto your site.

    Oh, If you want to have a look at the actual screenshot, here they are:
    (how it looks now)
    (how the other pages look)

    i actually wanted to be able to look at your actual code and not just what it looks like.

    Ah! This is the php code of the actual MicroWiki pages. – Hope it may helps!

    heh, i meant code for your site, not the microwiki.

    Here is my stylesheet:

    haha what’s so hard about giving me a link to your site?

    Okay2… I gave up… my link is
    There you go…

    alright, I have your solution:

    go and create a new php file called mywiki.php or something like that, whatever you want really. inside the file, paste the following code.

    <?php /*
    Template Name: Wiki
    <?php include "header.php"; ?>
    <div id="container">
    <div id="topcontent"></div>
    <div id="singlecontent">
    <div class="clearer"> </div>
    <div class="singlepost">

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_content(); ?>

    <div id="bottomcontent"> </div>
    <?php include('footer.php'); ?>

    Depending on how you added your wiki before, if you added it within the write pages, then you should be able to do the same thing here. Otherwise, you could take your wiki code, and paste it within the <div class=singlepost>

    I believe that this should work for you.

    Well… I have added that wiki.php page… but the problem is how to do your second instruction i.e. I do not add the wiki page using WP static pages feature… I used the EzStatic plug-in and Microwiki installation.

    So what do you think? I put it under the directory called “wiki” so.. http://www./myblog/wiki

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘One – Two Columns’ is closed to new replies.