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
- What does the token %1$s in WordPress represent [closed]
- Debugging upload problem: What part of WP does actual image-resizing?
- Real time Duplicate title check
- Load custom field value into div with AJAX
- Display all posts in current category
- How to display related posts from parent category
- How can I set custom order use this function
- How do I get images (with a thumbnail preview) to show in search results?
- Assign a picture URL to a page via PHP
- Check if Product is in a Specific Category in Functions.php
- How to scale image with equal width and height without distortion?
- Stumped – Ajax Response Returns 0
- Escape post image attachments added to template
- Parsing php string in jquery [closed]
- Display post image with fancybox
- Using shipped version of jquery
- Category Thumbnail Display – How to display ONLY the main Category
- Echo URL of large version of Featured Image
- Implementing a tricky wordpress menu (nested categories + thumbnails)
- Woocommerce add to cart quantity buttons with AJAX
- Creating a related post section based on similar categories
- Cannot display or echo alt text on featured image
- wordpress count link clicks by ip address
- Issue adding sub category programmatically
- Grab posts by multiple categories
- How to get next image with this code from same post?
- get_children displaying images removed from the page
- Display category name only once inside loop
- Display image from an external rss feed on wordpress without plugins
- Thumbnails appear to be zoomed
- Creating sub-categories via php
- How can i display a jquery slide on front page
- Download images from media library to computer in BULK?
- Three Questions with Twenty Eleven theme
- Edit the_category (); for a hierarchical display
- Unset session variable on page reload / setup but exclude AJAX
- How to array only one key from another array
- Division by zero error in image.php
- How do I remove a category from a wordpress loop>
- Upload non-featured image to image field
- Trying To Get Child Categories To Show, Issue With foreach Loop
- WordPress İmages Upload & Delete Error
- Execute Jquery when a specific page in my plugin is loading
- what does $options = get_option(‘test_theme’); do?
- Validating an email input from form field before submit using JQuery, AJAX, and PHP
- Custom html/php/jquery map code in WordPress/elementor?
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Add Custom Category Description When Empty
- Add a product category to a specific product via a button
- How to check a variable Changes
- How do I stop an Image Address from loading in the Browser?
- Customize the “Available for back order” text for specific variation
- If user has clicked link add class and store using PHP/WordPress
- How to Link to category titles if it is in the single post content?
- How to add a PHP scripts into WordPress
- How can i show specific Category List?
- How to show category just on specific pages?
- wp_set_object_terms returns 500 error when called through AJAX function
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- How to create an Email Subscription input in WordPress?
- How to filter specific element of an array in wordpress/php?
- Styling a specific post after hovering over it
- Remove item from post_meta array via AJAX
- PHP array to jQuery array ” Uncaught SyntaxError: Unexpected token < "
- List categories assigned to a post
- Unable to get Post Category Name and URL
- wordpress ajax pagination
- AJAX Not Working With WordPress Database properly
- 500 (Internal Server Error) of external php file
- No Authors for custom post type
- Dynamic Gallery
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Missing items on page
- jQuery vs. $ – Creating jQuery scripts in JavaScript in WordPress using External Libraries
- Cannot get custom javascript to execute on page
- HTML in PHP problem [closed]
- Jquery autosave text area after typing
- How to create categories out of a list of words?
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- Remove default Image Sizes
- Is there a way of displaying related posts from lowest hyrachical order (lowest child category to parent category)
- Add/alter image attribute before render
- Upload multiple files via ajax from an HTML file input
- get_post_meta returns on side but it doesn’t return on bottom of admin page