Similar Posts
Genesis Featured Image on top
Genesis WordPress theme /* Code to Display Featured Image on top of the post */ add_action( ‘genesis_before_entry’, ‘featured_post_image’, 8 ); function featured_post_image() { if ( ! is_singular( ‘page’ ) ) return; the_post_thumbnail(‘post-image’); }
WordPress Disable Password Change Nofitication
There are a few older functions that you would implement via your own custom plugin, but I found that none of them work. This one didn’t work: if ( !function_exists( ‘wp_password_change_notification’ ) ) { function wp_password_change_notification() {} } This one didn’t work: if ( !function_exists(‘wp_new_user_notification’) ) { function wp_new_user_notification( ) {} } This one didn’t…
WordPress add class to menu anchor
WordPress has tools to add a class to an LI element of a menu item. It also has tools to add a rel value to the anchor of a menu item But it does not have tools to add a class to the anchor element of a menu item. Let say I add a phone…
Genesis move post title below image
// Move image above post title in Genesis Framework 2.0 remove_action( ‘genesis_entry_content’, ‘genesis_do_post_image’, 8 ); add_action( ‘genesis_entry_header’, ‘genesis_do_post_image’, 8 );
CSS Clearfix with Pseudo Selector
Opposed to adding an “Empty Div” orĀ “Overflow” to clear floats, you can use the CSS pseudo selector (:after) to clear floats. .clearfix:after { content: “.”; visibility: hidden; display: block; height: 0; clear: both; }
Woocommerce Logged in Only
Restrict Woocommerce pages to logged in usesrs only: /****************** Logged in Only *************************/ function woo_loggedin_redirect() { if ( ! is_user_logged_in() && (is_woocommerce() || is_cart() || is_checkout()) ) { // feel free to customize the following line to suit your needs wp_redirect(home_url()); exit; } } add_action(‘woo-loggedin_redirect’, ‘woo_loggedin_redirect’);