ACF Display Frontend (Opt Fields)

// Shortcode function to display ACF field from options function display_acf_option_shortcode($atts) { // Parse attributes with defaults $atts = shortcode_atts(array( ‘field’ => ”, // Default field (leave empty or set fallback) ), $atts); // Check if field is provided if…Continue reading

Number of Woo Products per page

/** * Change number of products that are displayed per page (shop page) */ add_filter( ‘loop_shop_per_page’, ‘new_loop_shop_per_page’, 20 ); function new_loop_shop_per_page( $cols ) { // $cols contains the current number of products per page based on the value stored on…Continue reading

[Advision Publisher] Short Codes

// === SCHEMA: define every shortcode, its params, and internal template === $shortcode_schemas = [ ‘faqs’ => [ ‘description’ => ‘Expandable FAQ section.’, ‘parameters’ => [], ‘_internal’ => [ ‘template_id’ => 3676 ], // INTERNAL ONLY ], // [faq faqs='[{“question”:”…”,”answer”:”…”}]’]…Continue reading

WORDPRESS DYNAMIC DATA FETCHING FUNCTION

/** * ============================================================================ * WORDPRESS DYNAMIC DATA FETCHING FUNCTION * ============================================================================ * @author Sumaiya Akter, Anytype Doc: anytype://object?objectId=bafyreidvxgrkcebamky2hxzxazxbe3phrie6ev44zyhjzco7cmhkgovhle&spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&cid=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci&key=6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv * @description This function dynamically fetches data from any specified * WordPress database table based on a set of search criteria. It…Continue reading

Filter by Taxonomy for unifi menu CPT

function rudr_taxonomy_filter( $post_type ){ // let’s decide about post type first if( ‘unifi-custom-menu’ !== $post_type ){ return; } // pass multiple taxonomies as an array of their slugs $taxonomies = array( ‘un-menu-cat’ ); // for every taxonomy we are going…Continue reading