Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
dsgnwrks-instagram-importer centering images. Most themes support the 'aligncenter' class, and this will add that class to the imported images.
function dsgnwrks_instagram_insta_image_aligncenter( $img ) {
// add aligncenter class
$img = str_replace( 'insta-image', 'insta-image aligncenter', $img );
return $img;
add_filter( 'dsgnwrks_instagram_insta_image', 'dsgnwrks_instagram_insta_image_aligncenter' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.