Similar Posts
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…
Contact Form 7 in Google Tag Manager
Contact Form 7 on WordPress with Google Tag Manager
Woocommerce default shipping selection
This function makes Woocommerce automatically select the lowest cost shipping by default function ea_default_shipping_method( $method ) { $_cheapest_cost = 100000; $packages = WC()->shipping()->get_packages()[0][‘rates’]; foreach ( array_keys( $packages ) as $key ) { if ( ( $packages[$key]->cost > 0 ) && ( $packages[$key]->cost < $_cheapest_cost ) ) { $_cheapest_cost = $packages[$key]->cost; $method_id = $packages[$key]->id; } }…
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; }
Genesis add title to Blog page
If WordPress doesn’t show a title be default on a blog page. This code is for Genesis, but will work for any theme if you change the hook. Create a new file called home.php with the following code. That’s the template file that WordPress uses for its Posts Page. $content = get_post( $posts_page )->post_content; $title_output…