The documentation for Retina JS states that images need to have the data-rjs
attribute set in order for them to opt in to using the script. This can be done using the third parameter of get_the_post_thumbnail()
:
<?php echo get_the_post_thumbnail( get_the_ID(), 'thumbnail', array( 'data-rjs' => '3' ) ); ?>
Related Posts:
- Jquery in Child Theme
- Want to have the Post editor remembering the last editing position
- When does WordPress wrap inline scripts in CDATA?
- Question about the way that wp_register_script works
- My scripts-bundle.js file is getting sent to the browser as a stylesheet css file. Help!
- Add js into a theme [closed]
- What’s the proper way to include inlined javascript-source?
- JavaScript Files Registered in Parent Theme Won’t Load When Calling wp_enqueue_script() in Child Theme?
- Angular integration with homepage
- Twenty fifteen theme – change responsive menu condition
- how do i in ignore/disable/delete a javascript call from parent in child theme?
- Using JQuery to check for Rel Attribute of Image before Overriding It
- Getting a ‘slide down’ js panel implemented within WP
- WordPress 5.1 upgrade has lost the parent theme JavaScript
- How to use only scripts from new theme?
- Webflow Interactions on WordPress site?
- share wrordpress data between two shared hosts using REST API
- Will this js code work in a page template?
- JQuery Error in theme for .live is not a function [closed]
- Divi theme including javascript
- Help!!! Old theme doesn’t load scripts and conflitcs with plugins
- How to remove pop up on website (css changes not visible)?
- What are all the available parameters for query_posts?
- How do I change the header image height in Twenty Seventeen?
- Is it OK to remove theme credits from footer? [duplicate]
- What theme is good for posting code? [closed]
- Difference between stylesheet_directory and template_directory
- How to see files in directories in “Edit Themes” screen
- WordPress generating 404 on .mp4 file in theme folder
- Why are my widgets not saving when being added to a sidebar?
- Building useful features into your theme
- How to remove “Proudly powered by WordPress” in Twenty Sixteen (2016) theme?
- Editing theme files and access to the Code pages only to super-admin?
- Current theme broken – after server and domain migration
- Categories for Pages Not Saving in Admin with Custom Categories Metabox?
- Switch Theme Through Options Panel
- Weird post pagination url redirect
- How get Themes list via REST api?
- Activate a new WordPress Theme Only for Admins
- WordPress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]
- How do I copy my Parent Templates to my Child Templates?
- Theme Editor Not Showing
- Pros and cons of using Backbone for WordPress theming [closed]
- Can I create multiple instances of the BuddyPress Activity Stream with separate themes? [closed]
- Can I rename a theme’s folder and still receive updates?
- Child theme not visible
- Custom theme folder
- How to load parent theme style.css?
- How to setup a new WordPress theme without deactivating the current theme?
- WordPress is not able to change themes
- How do I set the featured image size on the single post?
- Where all are child themes recorded when they are created in WordPress
- Using custom JS plugins with WordPress?
- I have some doubts regarding how to implement child theme
- How to conditionally display widgetized areas in theme customizer?
- How prevent someone from opening my theme directory
- loss of theme options while site deployment in production
- How to install WordPress theme and configure it? [closed]
- How do I get rid of or change the footer in my child theme?
- How can I make some themes usable only by admins?
- Categories gone after changing theme / demos [closed]
- Own Theme Customizer displays error message when saving, saving still works
- 1 Database for multiple WordPress themes
- Page has a parent and $post->post_parent returns 0
- How to create different navigation for registered users in WooThemes Canvas?
- Selected template is not respected for home page in WordPress
- How to restore file or theme?
- How to install themes with the demo content?
- Jetpack CSS .screen-reader-text breaks mobile menu [closed]
- Error when using ‘continue reading’
- How to update theme to specific version
- Child theme’s stylesheet cannot load [closed]
- Configure new installed WordPress in live server
- Where does WordPress get the theme name from to check for updates?
- Hi everybody, I have a problem of search box
- Changing an image in header.php
- Updating WordPress Theme Files
- Multiple sub directories for theme template pages
- How to get the theme directory URI?
- My blog suddenly can’t find my stylesheet?
- Twenty Ten Theme: Replace the Logo by a picture without moving the code
- How to fix Scrape key check failed on WordPress VPS?
- How to use my .mo file in the Divi child theme instead of file in a parent /builder directory?
- How to fix Gutenberg with SiteOrigin page builder deleting content when editing
- Edit a template while still keeping a Landing Page on the main address
- How to allow users to switch to the child theme from front end without plugin?
- Change whole theme depending on resolution
- post_prev & post_next within same category
- Costum Theme template directoy url problem
- How to find out which template the HTML content comes from?
- Convert theme to be based on Bootstrap?
- Include root files into header files
- Commenting in CSS (//) equals “none”? [closed]
- Static posts page is not working
- Cannot use some themes within Managed WordPress of Go Daddy [closed]
- How to track your theme usage on the internet?
- How to add Company Logo to Chosen Theme
- What security risk is not having “default” theme?
- Absolute and relative paths
- Get header/footer list for a theme