WordPress.org

Ready to get started?Download WordPress

Forums

Removed Sidebar now Content in Wrong Place (45 posts)

  1. Disease8
    Member
    Posted 3 years ago #

    Hello everyone nice site very helpful so far I wonder if someone could help please?
    I was trying to follow these instructions: http://wordpress.org/support/topic/remove-side-bar-2

    The Blog/Website is for my musician friend he is paying me to make it for him.

    I hope someone can help asap as it looks pretty unprofessional now.

    I just couldn't find the correct "margin" text to edit...

    Regards,
    Dom.

  2. Disease8
    Member
    Posted 3 years ago #

    [CSS code moderated - the link to your site is enough to access the stylesheets]

  3. alchymyth
    Forum Moderator
    Posted 3 years ago #

    when you removed the sidebar code from the (index.php ?) template, you may have forgotten to delete a closing </div> which is now too much;

    the section looks like this in the html code:

    <div id="container">
    
    				</div>
    				<div id="content">

    (it might look a bit different in the php file)

    remove this </div> from the section above.

    ----
    to widen the content to the full width, add this to style.css:
    .home #content, .archive #content {width:100%; }

    (if you want to use the search function, you might need to add .search #content { width:100%; } as well.)

  4. Disease8
    Member
    Posted 3 years ago #

    Ok I will try this thank you .. I am very noob so its difficult for me..
    Trying now. my client is not very happy that the website is all muddled! lol..

  5. Disease8
    Member
    Posted 3 years ago #

    Ok so I am looking in the index.php in the theme folder. It seems to be one of the first things in the code?

    Yeah its fixed it!!
    Thanks mate! :-)

    When I click on "background" one of the pages, I get this error:

    "Parse error: syntax error, unexpected ')' in /home/charliel/public_html/wp-content/themes/my-depressive/page.php on line 7"

    I reckon it was when I was going through everything deleting the sidebar..

  6. Disease8
    Member
    Posted 3 years ago #

    You are a god, a legend among men, you have saved my bacon twice!

    Thanks soooo much man!

    I went through and found everywhere it said:
    <\div>

    and deleted the code around that. from <div> to <\div>
    as these are where the different commands are right?

    Originaly I followed the post above and just deleted: get_sidebar()

    But I left in the div parts and the content in between.

    Now I just want to centre the text and get rid of categories..

  7. maikunari
    Member
    Posted 3 years ago #

    It looks like some of the php may have been edited incorrectly when removing your sidebar. Could you post the code of your index.php file here so we can see what's missing?

  8. Disease8
    Member
    Posted 3 years ago #

    Damn now on the home page:
    Parse error: syntax error, unexpected '}' in /home/charliel/public_html/wp-content/themes/my-depressive/index.php on line 77

    I wish I knew what I was doing..

  9. Disease8
    Member
    Posted 3 years ago #

    Ok I fixed this now I just have the problem of having the categories after every post. I just want the date..

  10. Disease8
    Member
    Posted 3 years ago #

    Hi maikunari...
    Thanks but I fixed it... Took out a < with some stuff in between another >..

    looked like it wasnt doing much so removed and now it works again..

    Just want to get it looking like a normal website. With the front page being a blog but not the other pages....

    Respect for your help..

  11. maikunari
    Member
    Posted 3 years ago #

    To show only the date all you need is <?php the_date(); ?>

  12. Disease8
    Member
    Posted 3 years ago #

    ok man in the index.php of the theme?

  13. Disease8
    Member
    Posted 3 years ago #

    Where should I add this in?

  14. maikunari
    Member
    Posted 3 years ago #

    Depends, are you building this from the default twentyten theme?

  15. Disease8
    Member
    Posted 3 years ago #

    nope from my-depressive theme . . .
    Was the closest one to how I wanted it to look so I edited my own banner for it and just been trying to get it to look like a normal website..

  16. Disease8
    Member
    Posted 3 years ago #

  17. maikunari
    Member
    Posted 3 years ago #

    Ok, first check your index.php file, see if you have a div with a class of meta

    <div class="meta"> some php code </div>

    If you don't see it in index.php see if you have a file called loop.php

    The piece you want to change will probably look like this <?php twentyten_posted_on(); ?> replace that with <?php the_date(); ?>

  18. Disease8
    Member
    Posted 3 years ago #

    Just need to centre the text on all the pages and get rid of categories and I will be happy ...

  19. maikunari
    Member
    Posted 3 years ago #

    Ok, I took a look in the my-depressive theme, this is where you want to replace that code:

    <!-- header-->
    <div class="meta">
    <span class="meta-info meta-text meta-link">Posted on <?php the_time('jS F Y') ?> in <?php the_category(', ') ?></span>
    </div>

    All you need to do is remove the <?php the_category(',') ?> part, and the "in" right before it and you should be good on that front.

  20. maikunari
    Member
    Posted 3 years ago #

    You'll also need to do the same thing in single.php, this is the file that shows single post pages.

  21. Disease8
    Member
    Posted 3 years ago #

    You have done it thank you so much my friend!!

    Thats so awesome!

    Just one thing left which is too centre everything as its slightly leaning to the left at the mo..

    Cheers again for your help!

  22. maikunari
    Member
    Posted 3 years ago #

    No problem at all,

    to center the text find: div#content and add this rule
    margin-left: 120px;

  23. Disease8
    Member
    Posted 3 years ago #

    is that in index? Do I need to put those triangular things next to it? (<) ?

    Sorry I am very noob at this wordpress business..

  24. maikunari
    Member
    Posted 3 years ago #

    Oh sure, no this will be in your stylesheet, a file called style.css

    Also, make sure to do the same change with the category business in single.php, click the title of your post on the homepage to see what I mean.

  25. maikunari
    Member
    Posted 3 years ago #

    In the style.css file about a third of the way down you'll find this:
    div#content { width:550px; padding:10px 0px 10px 15px; float:left; text-align:left; background:#000;}

    replace that with this:

    div#content { width:550px; padding:10px 0px 10px 15px; float:left; text-align:left; background:#000; margin-left: 120px; }

  26. Disease8
    Member
    Posted 3 years ago #

    Oh sure, no this will be in your stylesheet, a file called style.css

    Also, make sure to do the same change with the category business in single.php, click the title of your post on the homepage to see what I mean.

    damn it the side bar comes back and everything. So this is because the single.php file needs the same treatment I guess?

    I will edit style the way you said thank you so much!!

  27. maikunari
    Member
    Posted 3 years ago #

    Yup, to get rid of the sidebar everywhere you'll need to remove it from index.php, single.php, page.php and 404.php

    This is the chunk you want to remove, just to make sure you don't run into the same problem.

    <?php
    if(my_sidebar_position() == 'right'){
    ?>
    <div id="sidebar">
    <?php get_sidebar(); ?>
    </div>
    <?php
    }
    ?>

  28. Disease8
    Member
    Posted 3 years ago #

    wow thats a lot I seem to have done it without deleting so much text?

  29. Disease8
    Member
    Posted 3 years ago #

    Just says "in" where the categories usually appear..

    But got rid of sidebar.. Now I will try to centre everything

  30. maikunari
    Member
    Posted 3 years ago #

    You may have removed the sidebar by just deleting :
    <div id="sidebar">
    <?php get_sidebar(); ?>
    </div>

    but that leaves the extraneous php there serving no purpose, so better to get rid of it and keep everything neat and tidy.

    Also, to remove the in, just delete the text "in" that comes before the <?php the_category(',') ?> you deleted.

Topic Closed

This topic has been closed to new replies.

About this Topic