Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter bbtodd

    (@bbtodd)

    Hi, if you look at the page I have a link to, it’s a two column grid, the first row are just images, each image in the first row take up 100% of the column, which is roughly 600px per column.

    The second row are two slideshows side by side. The column is still roughly 600px wide but the images inside the slideshow box are only 346 px wide. They should be the full 600 px width. So it’s a small box in a big box.

    As I mentioned above, in the HTML the height and the width of the image is explicitly set in the HTML. I have no control over the HTML. I can find no settings which allows me to adjust the width of the images inside the slideshow.

    Is this really how it was designed to work? If so I’ll need to undo jetpack and find something else.

    Thanks

    FYI – using CSS to hide the image won’t actually stop the browser from loading that data, it just won’t show it.

    You should look up wp_is_mobile()
    https://codex.wordpress.org/Function_Reference/wp_is_mobile

    Find the part of the code where the featured image is loaded, probably header php and use this:
    <?php
    if ( wp_is_mobile() ) {
    /* If mobile do nothing/do not load featured image */
    } else {
    /* Not a mobile device, put the code here that inserts the featured image */
    }
    ?>

    • This reply was modified 7 years, 2 months ago by bbtodd.

    I think you need to hide the existing header image and apply a background image to the div using CSS. I didn’t test this but something like this. The height you can change to whatever you need, you might also need to specify width of the div. Add this to the CSS file.

    @media only screen and (max-device-width: 489px) {
    img.attachment-twentyseventeen-featured-image {
    display: none; /* hide default image */
    }
    .single-featured-image-header {
    display:block;
    background-image: url(“http://rvinspector.pro/wp-content/uploads/2019/03/rv-inspector-motorhome-mheader.jpg&#8221;) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    height: 240px !important;
    }
    }

    I would avoid dreamweaver, it’s fallen out of favor. WP is great but there is a learning curve for certain things,

Viewing 3 replies - 16 through 18 (of 18 total)