Jump to content

Archived

This topic is now archived and is closed to further replies.

eusebius

Crop Featured Image from Top?

Recommended Posts

eusebius

Hello,

 

I notice that DMS adds several custom image sizes, such as aspect-thumb and landscape-thumb. One of these is used for the featured image on single post pages.

 

Is there a way to force that image to crop from the top center rather than center center? I've tried several plugins, like Crop from the Top and Simple Image Sizes, but they don't seem to work with WP 3.9, which supposedly has made it easier to implement this on the theme level.

 

Can someone provide some code that we can stick in functions.php of our DMS child theme?

 

Thanks

Share this post


Link to post
Share on other sites
James B

Hi there, I've not come across this before but this css example might be able to help you - http://stackoverflow.com/questions/11552380/how-to-automatically-crop-and-center-an-image


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

  • Similar Content

    • Jessica McCabe Lawson
      By Jessica McCabe Lawson+
      I'm building a product catalog site. The featured image is set correctly, but the woocommerce placeholder image is displaying instead. If I click on the placeholder image, the featured image appears, and the featured image works fine as a thumbnail.
      Please view the site here: http://www.directmat.net/product/power-lock-logo-mat/
      Note: I deleted the placeholder image via FTP to see if that would inspire Quick Shop to look for the featured image. No such luck. Please help!
    • Kedark
      By Kedark+
      Hello,
      I apologize for the trivial question, but I can not deal with it. How do I turn off the display of a distinctive image on the page? (I have to add it because I use plugins that use it), but as I display the page, I do not want it to be visible (and appears above the subject.).
      Probably a cliché but I can not deal with it. Therefore, a request for help.
      Regards
      RKA
    • mtaus
      By mtaus+
      I have added a Lax section on the footer of this site: http://www.ics-law.org.php72-38.lan3-1.websitetestlink.com/ but the background image is not displaying. When I first add the image it appears in the background, but then after saving and reloading it is gone even though the thumbnail indicates it's still there. Screenshot attached.
      Any suggestions?

    • mtaus
      By mtaus+
      I'm trying to add a Careers page to a site to display job openings. The plan is to create a Post using a subcategory 'Careers' and then display those on the page. All of the post sections in PL seem to include images and there's no obvious way to remove them or include an excerpt from the post. 
      Any suggestions?
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
×