Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1062059

    Mobility
    Participant

    Hello!

    I currently have featured images disabled in my blog posts and am adding them manually. I would like the featured image to align left to the body text like this:http://6bd.152.myftpupload.com/gearing-up-for-growth-future-perspectives-on-the-global-truck-market/

    Is there any way to do that?

    Thank you!

    #1062355

    Jade
    Moderator

    Hi there,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1063174

    Mobility
    Participant

    Hello–

    I provided you with with my URL above. It’s a staging site. As mentioned, I’m currently using CSS to remove the default featured image that shows up above the post and entering it manually. For your convenience, I’ve removed the code that hides the featured image. Here’s an example on my site: http://6bd.152.myftpupload.com/nextchallenge-smart-cities-to-support-several-demonstration-awards/

    I would like the featured image to display like the image that left aligns in the body text. Please advise on how to do so, if possible. It would be great to avoid manual entry on all of them.

    #1063194

    Thai
    Moderator

    Hey There,

    Please add the following CSS under Customizer > Custom > Global CSS:

    @media (min-width: 980px){
        .single .entry-featured {
            float: left;
            width: 30%;
            margin-top: 2.15em !important;
            margin-bottom: 0 !important;
        }
    
        .single .entry-wrap {
            float: right;
            width: 65%;
        }
    }

    Then you don’t have to add manual the featured image to your post content.

    Regards!

    #1063433

    Mobility
    Participant

    Thank you! This is so close! Is there not a way to make it inline with the text as opposed to off to the left?

    #1063520

    Rupok
    Member

    Hi there,

    Thanks for updating. Sorry but I didn’t quite get it. Would you clarify with a screenshot?

    Cheers!

    #1063659

    Mobility
    Participant

    Sure thing. Please see attached. Essentially, I would like the image to be inline with the body text. I feel like this requires edits to the content.php file (in a child theme, of course), but I could be wrong.

    #1063823

    Nabeel A
    Moderator

    Hi again,

    If I understood you correctly then you’ll have to edit the page in WordPress editor, click on the image and set it’s alignment to “Align Left”.

    Hope this helps!

    #1063831

    Mobility
    Participant

    I understand how to do that, but is there any way to make the featured image automatically align left within the body text of the post?

    #1064290

    Friech
    Moderator

    Hi There,

    You can add this under Custom > JavaScript in the Customizer.

    (function($) {
       $(".single .entry-thumb").insertBefore(".single .entry-content");
    })(jQuery);

    And then add this on your custom CSS

    .single .entry-thumb {
    	width: 20%;
        margin-right: 3%;
        float: left;
    }

    Obviously, you need to remove those left align images that you manually placed.

    Hope it helps, Cheers!