cmplz-show-banner
/** * Show the banner when a html element with class ‘cmplz-show-banner’ is clicked */ function cmplz_show_banner_on_click() { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/** * Show the banner when a html element with class ‘cmplz-show-banner’ is clicked */ function cmplz_show_banner_on_click() { ?>Continue reading
//script: r2c on Call Param with Enhanced Tracking //ver 2.6 if (!defined(‘ABSPATH’)) exit; // Static phone number override – if set, will bypass all other functionality $static_phone_number = ‘8001234567’; // Set your phone number here, e.g. ‘8001234567’ // If static…Continue reading
add_filter( ‘aioseo_keywords’, ‘aioseo_filter_keywords’ ); function aioseo_filter_keywords( $keywords ) { if ( is_singular() ) { $keywords = explode( ‘,’, $keywords ); array_push( $keywords, ‘anotherkeyword’ ); $keywords = implode( ‘,’, $keywords ); } return $keywords ; }Continue reading
add_filter( ‘aioseo_schema_output’, ‘aioseo_filter_schema_output’ ); function aioseo_filter_schema_output( $graph ) { if ( ! function_exists( ‘is_product’ ) || ! is_product() ) { return $graph; } foreach ( $graph as &$item ) { if ( ‘Product’ !== $item[‘@type’] ) { continue; } if…Continue reading
function wpb_change_search_url() { if ( is_search() && ! empty( $_GET[‘s’] ) ) { wp_redirect( home_url( “/search/” ) . urlencode( get_query_var( ‘s’ ) ) ); exit(); } } add_action( ‘template_redirect’, ‘wpb_change_search_url’ );Continue reading
add_filter( ‘aioseo_toc_hash_prefix’, function( $prefix ) { return ”; } );Continue reading
add_filter( ‘aioseo_toc_hash_prefix’, function( $prefix ) { return ‘mysite-‘; } );Continue reading
function preload_first_content_image() { if (is_single()) { $post = get_post(); if ($post) { // Get post content $content = $post->post_content; // Find first image in the content preg_match_all(‘//i’, $content, $matches); if (!empty($matches[1])) { $first_image = $matches[1][0]; echo ‘‘; } } }…Continue reading
function get_city_field( $user_id = null, $role = null, $required = null, $readonly = null) { $field[‘name’] = ‘_city’; $field[‘label’] = ‘City’; $field[‘key’] = ‘city’; // // if( $user_id && in_array(‘exhibitor’, get_userdata( $user_id )->roles )){ // $field[‘label’] = ‘Gallery City’; //…Continue reading
/** * Removes the ‘woocommerce_package_rates’ filter added by the Caddy plugin. * * Removes the filter that hides other WooCommerce shipping rates * when free shipping is available, allowing all rates to show. * * @author Mike Valera * @plugin…Continue reading