The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Function.php adding automatically images width + height

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #195946

    Hi, I am working on a site, that needs to have the images width=”” height=”” added in a certain class. The site does not have this on images,

    So it is like this now,

    <div> <img src="path" alt="title" /> </div>

    But I need it like this,

    <img width="200" height="150" src="path" alt="title" />

    It is a a high end theme, responsive with a child theme.

    So I would like to see, a code in the function.php that will assign this to the images in certain class, or classes. I am hoping to have about 4 different sections with different classes. So may be feature will be 300×400 pixels, the second feature images will be 250×250.

    There are four types of sizes on the front page each one of them with their own ID.

    And so on, can that be done?


Viewing 1 post (of 1 total)
  • The forum ‘Other’ is closed to new topics and replies.