I was able to find some jQuery that helped solve the issue:
$( ".alignright" ).parent().addClass( "alignright" );
$( ".alignleft" ).parent().addClass( "alignleft" );
$( ".aligncenter" ).parent().addClass( "aligncenter" );
This small piece of code finds alignright
, alignleft
, and aligncenter
then adds those classes to the “parent” container, which is the containing element that those classes are applied to – in my case that would be the “featured” span.
Thanks,
Josh
Related Posts:
- ajax live search for post title
- How can you limit srcset on a single type of page?
- Scripts not appending to element in AJAX call – why?
- Remove after images
- PHP mixed with some JS code to update WordPress theme settings
- echo custom fields with AJAX
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- Creating multiple category drop down
- Automatic add space if user enters number(any digit)
- Add image size if page template
- Set JPEG compression for specific custom image sizes
- remove links from images using functions.php
- Issue with wp_get_attachment_image() and SVG file type
- Removing default image size list in Media Box
- How to create thumbnails for PDF uploads?
- AJAX handler throws 400 (Bad request) – why?
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- Why are image thumbnails cropped proportionally (not per dimensions)?
- How to save Uploaded image in custom option panel?
- Gallery images titles – get from post
- How to add a rel attribute to images that contains their categories?
- Why are image thumbnails cropped proportionally (not per dimensions)?
- radio button is checked but display not check
- Display a function using AJAX
- Best way to programatically add “rel” attributes to page and post images
- Add external js file to footer with id
- Ajaxing function in widget class
- woocommerce target button with class after ajax update
- jquery won’t load in footer
- WordPress doesn’t Load JQuery Now? Do I need to enqueue JQuery also?
- Count total number of images in post and echo results as number
- Replace menu links with # and add name to its li
- Automatically wrap multiple images in div
- Loading CDN that requires jQuery in WordPress
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Overwriting Parent Theme’s Image Sizes
- Using Schema with `the_excerpt`
- Image rotation fails to regenerate custom sized thumbnail
- Twentyten Child Theme: header images display messed up in admin panel
- Wp_query function to search from product_title ‘OR’ product tags name
- How to change the order of Jquery in the footer of my theme?
- Jquery implementation not working on page reload
- Set spesific size of featured images
- Attempt to change jQuery version caused White Screen of Death
- media resize/crop possibilities?
- Load jquery only for certain pages in the backend
- Add a jQuery Function
- jQuery does not work
- Way to store featured image width and height in two separate variables?
- Enqueuing latest version of jQuery into a child theme returns a blank screen
- srcset and custom field get_post_meta and wp_get_attachment_url
- Limit dimensions of “Full” size images
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- Woocommerce image sizes missing from Appearance › Customize but not declared by theme
- The correct way to add a JavaScript in the functions.php [closed]
- Where is this JQuery coming from?
- Need To Change WordPress Meta Tags… Includes wordpress shortcodes
- Need to convert image url to a Base_64 data url with wordpress function..
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- How to add a new image size and apply it to posts only?
- get content from page through AJAX
- Custom Image Size in Insert Media
- colorbox not loading in
- How to add php within jquery
- Using add_image_size in functions.php to get original uploaded file
- get_image_tag() html output : empty src attribute
- Lightbox type effect to support a HTML/jQuery image map
- Need To Resize Images Exactly Without Losing Image Details
- Custom image sizes showing in Classic Editor only when upladed directly to post
- how can I change all wordpress media file url to custom cdn url?
- How to change images url in function.php?
- How to use data URL in WordPress?
- Ajax Form Issues using Lightsail (AWS)
- Class parameter in get_avatar args doesn’t get added to output
- blank page with wp_get_attachment
- How to use `foreach()` in ajax call
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- WordPress Ajaxifying not working properly
- Execute jQuery with custom event listener after successfully add an item to the cart
- Printing medium sized image
- Why am I losing image quality on my site?
- Replace image attributes for lazyload plugin on image elements with specific class
- Some code is added automatically to my site’s header – what is it?
- Zip all (original) images from media gallery
- No compression occurs on my jpegs after adding jpeg_quality hook to my functions.php file
- WordPress Jquery+scripts enqueue issue
- Moving CDN jQuery to footer does not work?
- Adding a jQuery rotator function
- Update add_image_size
- Function the_content
- Remove heading tags on line break
- How to use different jquery function of idangero swiper dependant on page template?
- Dynamically adding Captions to images
- Full size image option removing problem
- Ajax call does not work for this custom code
- How do I get my nav menu to show sub pages?
- Image width issue in IE [closed]
- Owl Carousel and WordPress Integration Via WP_Enqueue
- image_size with respect to aspect ratios