I solved this by removing the figure element around the image and applying
style="padding-bottom: calc((height/width)*100%); position: relative"
to the <div class="img_container"
instead, which contains both the placeholder and the hover image.
Related Posts:
- combine Code 1 with Code 2
- retrieve thumbnail from post ID of best selling product in category
- WordPress remove EXIF Data from specific Thumb
- Additional image sizes are not being generated
- Proper syntax or method for keeping url in modified isotope / category links
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to use thumbnail size of image if I’m only using src to get image
- get taxonomy thumbnail and use it as a variable in code
- Else/If Statement to Display Photo Descriptions
- How to Make Thumbnail of Post Stay Animated
- Adding wp_list_categories to a specific div that was appended using jQuery
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Pass php to database in JQuery: With AJAX?
- How to change links in the 3 main categories, on widget category, to a javascript function call
- PHP-Code inside Href-Tag
- How to make jquery count down timer function manually editable
- HTML showing after PHP code in tag
- In WordPress, how do I get the number of posts next to single_cat_title(”); in the category.php file?
- Use get() method to grab all categories and output inside another method
- Only show size attributes in product box woocommerce when available
- Custom Post type slider with thumbnail navigation
- Only show first image in foreach loop
- trying to get wp_get_attachment_url to output clickable link
- How to get category name or ID by post?
- A $_POST should occur when submit form but is not?
- Custom post type category not displaying category ID
- Argument for if term-> have child?
- Change default gallery images – Currently they are displaying full size imagese
- My jQuery Ajax form submit is still refreshing page?
- jQuery Ajax PHP function call returning [object Object]
- How to get current post category details inside “loop”?
- How to use the wpsnonce clone post link?
- How to separate categories with commas?
- Shortcode to pull posts
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- How to hide posts of a specific custom category in WordPress?
- Show all tags within a category?
- Post not populating for custom post type based on category selection
- Add new post in existing categories using wp_insert_post
- I’m unable to call img path using single quotes in an array?
- Output votes to div dynamically in wordpress
- Creating black and white copy of an image [closed]
- Get uploaded image and attach it to the new post
- How to change logo by category
- Problem with custom loop and wp_list_pluck [closed]
- Listing titles and custom fields of entries within subcategories
- Admin-ajax php not working on new wordpress version
- random display categories – change url
- Displaying list of posts in category page
- Echoing a CSS class based on category of post in a list
- Alphabetically Ordered Category in WordPress
- Get the id of all images in a post
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- How to add post thumbnail dynamically using Jquery?
- Proper way to use WordPress function with AJAX PHP file
- Output category list inside array
- calling function in external js file
- Do not duplicate posts with multiple categories in multiple loops
- Images Uploaded saving onto older/previous year folders
- Display an image based on field value
- Loading Posts & Category with Ajax
- Removing sidebar on category pages
- How to get current category
- WooCommerce: Display product categories to make IF statement
- Add valid XHTML closing img tags to WordPress galleries
- How to set a featured image (thumbnail) with PHP?
- Convert canvas to image and upload image to server
- Trying To Get Child Categories To Show, Issue With foreach Loop
- jQuery accordion menu
- JS file is not loading when i put wp_head() and wp_footer
- Controlling image output size ACF repeater [closed]
- Live search from database table
- Image rotation issue (horizontal picture uploading as vertical) — Exif issue?
- WordPress İmages Upload & Delete Error
- How to refresh a page from jquery [closed]
- Angular not defined [closed]
- Define category ID using get_post_meta
- Add a counter for mouseovers (custom field)
- limit number of post for achive page
- Generate responsive post thumbnails of same size
- Accessing an API with jQuery and AJAX
- Removed jQuery script from header.php , any problems?
- Setting a default thumbnail url if no thumbnail
- Unexpected token ILLEGAL, even on clean install – jquery-issue?
- Set cookie for visitor
- Wrap posts p tags in div
- Execute Jquery when a specific page in my plugin is loading
- Show parent categories of the current category
- is user member of a group, show them categories [closed]
- Showing Subcategory Name/Link Instead of Parent Category
- How to check if a category has a parent and child categories?
- WordPress custom taxonomy
- Admin Menu new tab external link
- Attaching images to posts manually (i.e. with custom code, without the use of an API)
- How To Pass Array To get_the_category_by_ID() and Get An Array Back?
- Replacing WordPress Icons (menu,icons32, etc)?
- Covert WordPress Blogname into JQuery
- go to home page when i select default in select-box