Forms ACF Add-On

add_filter( ‘forminator_render_fields_markup’, function( $html, $wrappers ){ $replacements = array( ‘%my_value_1%’ => ”, ‘%my_value_2%’ => ”, ‘%my_value_3%’ => ”, ‘%my_value_4%’ => ”, ); if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $replacements = array( ‘%my_value_1%’ => get_user_meta( $current_user->ID, ‘field_1’, true ),…Continue reading

Log Out

function change_menu($items){ foreach($items as $item){ if( $item->title == “Log Out”){ $item->url = wp_logout_url(‘/’); } } return $items; } add_filter(‘wp_nav_menu_objects’, ‘change_menu’);Continue reading

WooCommerce Quality Selector

add_action( ‘woocommerce_after_add_to_cart_quantity’, ‘ts_quantity_plus_sign’ ); function ts_quantity_plus_sign() { echo ‘+‘; } add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘ts_quantity_minus_sign’ ); function ts_quantity_minus_sign() { echo ‘–‘; } add_action( ‘wp_footer’, ‘ts_quantity_plus_minus’ ); function ts_quantity_plus_minus() { // To run this on the single product page if ( ! is_product()…Continue reading

featured-images-rss-feed

function featuredtoRSS($content) { global $post; if ( has_post_thumbnail( $post->ID ) ){ $content = '<div>' . get_the_post_thumbnail( $post->ID, 'large', array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content; } return $content; } add_filter('the_excerpt_rss', 'featuredtoRSS'); add_filter('the_content_feed', 'featuredtoRSS');Continue reading

Remove Author Links

// Remove the author link from bio. add_filter( ‘wpex_post_author_bio_data’, function( $data ) { unset( $data[‘posts_url’] ); return $data; } ); // Remove the author link from code functions which display in post meta. add_filter( ‘the_author_posts_link’, function( $link ) { if…Continue reading

Show Left Sidebar Before Content on Mobile

add_action( ‘init’, function() { if ( function_exists( ‘wpex_content_area_layout’ ) && ‘left-sidebar’ === wpex_content_area_layout() ) { remove_action( ‘wpex_hook_primary_after’, ‘wpex_get_sidebar_template’ ); add_action( ‘wpex_hook_primary_before’, ‘wpex_get_sidebar_template’ ); } } );Continue reading

Move WooCommerce Category Description Below Products

add_action( ‘init’, function() { // Disable subheading on product cats add_filter( ‘totaltheme/page/header/has_subheading’, function( $check ) { if ( is_tax( ‘product_cat’ ) ) { $check = false; } return $check; } ); // Display description below loop add_action( ‘wpex_hook_content_bottom’, function( $bool…Continue reading