Featured image alignment choices in WP editor
-
I design/develop custom themes and I would like to add image alignment as an option for featured images.
I prefer not to use a plugin to accomplish this.
Basically, I want to have an align dropdown option for featured images. I would then create CSS classes so if center was selected the image would appear above the post heading in the category listing page, left image align would wrap the heading and excerpt around the featured image.
Is there code I could add to the functions.php file to accomplish this?
Alternatively, could I add code that would detect an image’s proportions and apply an appropriate alignment automatically? For example, if the image was wide and narrow it would be centered above the post heading, if the image was not as wide or a square left align would be used by default.
Any feedback is MUCH appreciated!
- The topic ‘Featured image alignment choices in WP editor’ is closed to new replies.