Similar Posts
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’);
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 );
Remove Images from WooCommerce pages
single Product Pages Here’s a handy tutorial on removing product images from the single WooCommerce product page. The basic idea is that we’ll want to remove the action that adds WooCommerce images. We can do so by adding this snippet into our child functions.php or the Code Snippets plugin: 1 2 // Remove image from…
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’); }
Genesis archive change H1 to H2
//*Changing Genesis H1 Post Titles to H2 add_filter( ‘genesis_post_title_output’, ‘ac_post_title_output’, 15 ); function ac_post_title_output( $title ) { if ( is_home() || is_archive() ) $title = sprintf( ‘ %s ‘, apply_filters( ‘genesis_post_title_text’,get_the_title() ) ); return $title; }
Add robots meta tag to specific page
This method is for the Genesis framework, applied in the functions.php file // Add Robots Meta add_action( ‘genesis_meta’, ‘raz_robots_meta_tag’ ); function raz_robots_meta_tag() { if ( is_page(‘page title’)) { echo ‘<meta name=”robots” content=”noindex,nofollow”>’; } }