Add The Title Attribute To Featured Image in WordPress

add-title-attribute-featured-image

The title attribute for the WordPress featured post has been removed for a while, but you can get it back with the wp_get_attachment_image_attributes filter which can add the HTML attribute markup back in, add to your functions.php file…   add_filter( ‘wp_get_attachment_image_attributes’, ‘tl_add_img_title’, 10, 2 ); // Add title attribute to featured image function tl_add_img_title( $attr, $attachment…

Read More

Filter WooCommerce Order Received Thank You Text

You can filter the text on a WooCommerce order received after checkout, by default the text reads ‘Thank you. Your order has been received’, but you may want to add some further instruction, which you can do using the filter woocommerce_thankyou_order_received_text View the code on Gist. Above the original text is being replaced. Or below the…

Read More

No Header Footer Genesis Template

no-header-footer-template

Below is the code to create a Genesis template with no default header or footer elements, perfect to slot in to a page builder page. Add it in your child theme and add any other CPT names in the Template Post Type line, the option to choose it will be under the Page attributes meta…

Read More

Customize WooCommerce Product Search Field

woocommerce-search-field

The WooCommerce Product Search field can be added via a widget and also via a template tag… get_product_search_form() Another option is a filter get_product_search_form() by which you can create your own custom search field including using an icon. The Original Markup View the code on Gist. This will just reproduce the form in it’s original…

Read More

WooCommerce Skip Cart, Go Straight to Checkout Page

WooCommerce workflow can be a little too long for simple products, you can provide a better user experience, here’s how to get the product to skip past the cart page and go straight to the checkout page. First, uncheck the cart options in WooCommerce Settings -> Products. Then add in your functions.php add_filter(‘woocommerce_add_to_cart_redirect’, ‘themeprefix_add_to_cart_redirect’); function…

Read More