• Resolved ohk

    (@ohk)


    For this site: https://badalja.com

    I know how to remove the right sidebar everywhere. However, what I want is to have it for the homepage, archives, etc.—but not for the individual posts.

    Help?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hey there,

    You could use some CSS like this:

    .singular-post #sidebar-secondary {display:none}
    .singular-post #content {width:100%}

    Hope this helps. ??

    Take care.

    Thread Starter ohk

    (@ohk)

    Aha, “.singular-post” did the trick. Thanks, Timothy!

    Glad I could help, have a great weekend! ??

    TarStaff

    (@tarstaff)

    Hey how did you get your post image to go all the way across as well?

    Kye

    (@gmax21)

    Hey TarStaff,

    How ya mean?

    And a link to the page where I can see a post image and what you want?

    I’ll then take a look at making it full width.

    Cheers.

    TarStaff

    (@tarstaff)

    Thank you for your quick reply.

    I mean the way ohk has it set up in the single post view. Here is an example https://badalja.com/elsamarie-dsilva/. I used the code above to get rid of the right sidebar but the image still isn’t going full size. Its still resized to previous specs with the sidebar.

    I would prefer not to put the blog up because it is unfinished but if it is needed I can do so.

    Thanks again.

    (If you have a BTC address I can throw you a donation.)

    Hey TarStaff,

    Hope you’re doing well today ??

    I know you preferred not too, but would you mind sharing the link?

    Unless you’re using the exact same theme, the solution for your site will likely be different. Once we see the site then we can inspect the code and find out what elements we need to target.

    Look forward to hearing back! Hope you’re having a great day.

    Cheers,
    Tyler

    TarStaff

    (@tarstaff)

    No problem. The site is Kjamm.org.

    Thanks again.

    Hey TarStaff,

    Try using this CSS:

    .single-thumbnail.featured {
        width: 750px;
    }

    That will make your images on your posts go the full width, is that what you were wanting? ??

    Hope this helps!

    Cheers,
    Tyler

    TarStaff

    (@tarstaff)

    This is kind of what I needed but it seems to take the cropped version of the featured image and then blow that up so it’s all distorted. I need the original image there instead.

    https://kjamm.org/vote-here/

    Thanks.

    Hey TarStaff,

    Hope you’re doing well today!

    If you open up your functions.php file and go to about line 214 then you should fine this:

    add_image_size( 'single-thumbnail', 470, 260, true );

    screenshot illustration: https://screencast.com/t/d5l55esg

    Those are the width and height of your featured images. Change those to whatever you like. In this case you will likely want 750px width as that is the width of your post content.

    You will want to make sure you upload pictures that are at least 750px in width too of course.

    Keep in mind this will only change your featured images from now on. Your past uploaded ones won’t be changed because they have already been cropped. You can always go back and re-upload them though ??

    Hope this helps TarStaff!

    Cheers,
    Tyler

    PS. Not sure if you have a child theme here but this change would be best made in a child theme, otherwise you will need to re-do it after every update. https://codex.www.ads-software.com/Child_Themes

    I would like to do the opposite:

    Remove the left sidebar on post-pages and show the content wider like that.

    I realize it’s a more difficult issue due to the setup of the theme. Do you guys know a solution for that?

    Hey Tom,

    Hope you’re doing well today!

    A little more difficult but nothing we can’t handle for ya ??

    Try this CSS:

    .singular-post #sidebar-primary {
    display: none;
    }
    
    .singular-post .content-wrap {
    float: left;
    width: 100%;
    }
    
    .singular-post #content {
    width: 80%;
    }
    
    .singular-post #sidebar-secondary {
    width: 20%;
    }

    Change the width of the #content and #sidebar-secondary as needed ??

    Hope that helps Tom!

    Cheers,
    Tyler

    confused

    the expression .singular-post does nothing….

    Like the original question at the top, removing that works across the website but the single article css is greyed out and doesn’t work

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Remove right sidebar on a POST page’ is closed to new replies.