• Resolved dem10

    (@dem10)


    Can I set by default to put a generic image (determined by me) in grid in posts without pic?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Absolutely. ?? The most straight forward way of achieving this would be to upload the generic image to your Media Library and then use some custom CSS to add it to grid items without a featured image.

    The custom CSS you would need is as follows:

    .blog .site-content .hentry:nth-of-type(n) .entry-thumbnail {
        background-image: url(https://www.planwallpaper.com/static/images/colorful-triangles-background_yB0qTG6.jpg);
        background-size: cover;
    }

    As before, add the above snippet to your the CSS editor for your child theme or CSS plugin.

    You can replace generic_image.png with the file path to your desired image.

    Give that a try and let me know if any questions come up. ??

    Thread Starter dem10

    (@dem10)

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘assign default image in grid for post without picture’ is closed to new replies.