• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WriteNowDesign - Wordpress and Ecommerce Website Design

WordPress, Joomla, Ecommerce Website Design

  • Home
  • Prices/Packages
  • WordPress
  • Services
  • Portfolio
  • Blog
  • About
    • Testimonials
    • Locations
    • Online Payment
  • Contact
  • Show Search
Hide Search

Call 303-907-6133 Email

How to Modify Genesis Search Results Page

Genesis 2.0 Change Featured Image Alignment

June 26, 2013 by Pat Fortino

The default Featured Image alignment in Genesis 2.0 is left aligned. If you want to change it, here’s how.

Add the following code to your theme’s functions.php file.

/* change post featured image alignment */
remove_filter( 'genesis_attr_entry-image', 'genesis_attributes_entry_image' );

add_filter( 'genesis_attr_entry-image', 'wnd_attributes_entry_image' );

function wnd_attributes_entry_image( $attributes ) {

	$attributes['class']    = 'alignright post-image entry-image';
	$attributes['itemprop'] = 'image';

	return $attributes;

}

In the code above, the line 1 removes the genesis_attr_entry-image filter.

Line 2: Adds the filter back with your custom function. I created a unique function called  wnd_attributes_entry_image. You can call it whatever you want.

Line 8: I changed the default class from alignleft to alignright.

Note: Your template might use different css styles for alignleft, alignright, or alignnone.

Tagged With: genesis, Comments are closed. If you have information to share, contact me here.

Previous Post: « How to Add Comments Form to Specific Pages in Genesis
Next Post: Genesis Add Logo Image to Header »

Related

Primary Sidebar

Blog Categories

Call Today

Get a Free Quote

303-907-6133

Subscribe to News

News about WordPress, WooCommerce, & Technology

What’s New

  • WPForms Not Sending Notifications
  • Add Terms and Conditions WooCommerce
  • Fix WordPress AMP Validation Errors
  • Use the Classic Editor with Gutenberg Block Editor
  • Add a Message at Top or Bottom of WooCommerce Checkout Page
  • How to Link to a PDF in WordPress

Find Us On…

  • Facebook
  • Google+
  • LinkedIn
  • RSS

Call 303-907-6133 Email

© 2004–2021 · WriteNowDesign · Sitemap · Log in · Return to Top