WordPress.org

Ready to get started?Download WordPress

Forums

One - Two Columns (31 posts)

  1. silkyed
    Member
    Posted 9 years ago #

    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...

  2. omann0
    Member
    Posted 9 years ago #

    try creating 2 separate themes and a theme switcher

  3. lawtai
    Member
    Posted 9 years ago #

    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.

  4. silkyed
    Member
    Posted 9 years ago #

    @omann0:
    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!

    @lawtai:
    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.

  5. lawtai
    Member
    Posted 9 years ago #

    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.

  6. silkyed
    Member
    Posted 9 years ago #

    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.

  7. lawtai
    Member
    Posted 9 years ago #

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

  8. silkyed
    Member
    Posted 9 years ago #

    Oh, If you want to have a look at the actual screenshot, here they are:

    http://uploadi.info/userfiles/kami/scrshot1.JPG
    (how it looks now)

    http://uploadi.info/userfiles/kami/scrshot2.JPG
    (how the other pages look)

  9. lawtai
    Member
    Posted 9 years ago #

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

  10. silkyed
    Member
    Posted 9 years ago #

    Ah! This is the php code of the actual MicroWiki pages.
    http://paste.uni.cc/6766 - Hope it may helps!

  11. lawtai
    Member
    Posted 9 years ago #

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

  12. silkyed
    Member
    Posted 9 years ago #

    Here is my stylesheet:
    http://paste.uni.cc/6767

  13. lawtai
    Member
    Posted 9 years ago #

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

  14. silkyed
    Member
    Posted 9 years ago #

    Okay2... I gave up... my link is http://www.edsilk.aus.cc
    There you go...

  15. lawtai
    Member
    Posted 9 years ago #

    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>
    <div id="bottomcontent"> </div>
    </div>
    </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.

  16. silkyed
    Member
    Posted 9 years ago #

    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

  17. lawtai
    Member
    Posted 9 years ago #

    heh, i'm not sure how exactly the microwiki works as i've never used it. but my suggestion would be to open up the file that contains the wiki php code, and just copy it and paste it between the <div class=singlepost> </div> you could just delete out what's already in there too. I think that'd work best for you instead of using the ezstatic plug-in

  18. silkyed
    Member
    Posted 9 years ago #

    Hmm... I don't think the code's working:
    http://www./myblog/wiki/wiki2.php

  19. lawtai
    Member
    Posted 9 years ago #

    hmm, i'm not exactly sure how the microwiki works, so i'm a little clueless as to how to help you next. If anything, you could try to make a static page of one of your pages, instead of your main site. That way you wouldn't have the sidebar.

  20. silkyed
    Member
    Posted 9 years ago #

    Hmm... I just found out that you cannot execute php script in Wiki static pages. That way, I still have to use EzStatic.

  21. lawtai
    Member
    Posted 9 years ago #

    not sure how ezstatic works, but if you follow the div structure that i had before, you should still be able to get a single column.

    *I'll check back on this thread in the morning. Time for me to sleep! Hopefully you can get it to work.

  22. silkyed
    Member
    Posted 9 years ago #

    Haha... Sorry to bother you.. well good night and thank you very much...
    Btw, your site looks brilliant! Haha..

  23. lawtai
    Member
    Posted 9 years ago #

    heh thanks, well you have any luck?

  24. silkyed
    Member
    Posted 9 years ago #

    Haha... Unfortunately... still the same.. Cannot modify my template to suit it... Have any other idea?

  25. lawtai
    Member
    Posted 9 years ago #

    i'm not sure how ezstatic works, do you get to choose which static page it copies? if so, then just choose something like your archive page for it to copy.

  26. silkyed
    Member
    Posted 9 years ago #

    Well it does not copy anything basically. You just upload stuff like HTML or PHP pages to your wordpress dir and access it by browsing: yourdomain.com/your wordpress dir/index.php?static=your file/dir name.

    For more extensive documentation on it, please refer to
    http://www.asymptomatic.net/_wiki/EzStatic

  27. lawtai
    Member
    Posted 9 years ago #

    then just choose your archives page instead of your index.php page

  28. silkyed
    Member
    Posted 9 years ago #

    Hmm? What do you mean...

  29. lawtai
    Member
    Posted 9 years ago #

    try something like: yoursite.com/archives/?static=blah

    or however it's supposed to be setup. heh if this doesn't work, i'm really out of ideas since i don't know how the wiki works or how ezstatic works as well.

  30. silkyed
    Member
    Posted 9 years ago #

    Haha... ok I suppose that does not work. Do you know any better wiki plug-in for WordPress? I just could not find one that is better than this!

    -> Oh well... I might just have to look for another good-looking theme that suits this whole MicroWiki thing... Thanks very much for your support indeed!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.