Posts

Custom Table of Content

/** * Zeevou Container-Based Table of Contents Shortcode * * A highly customizable, container-scoped table of contents generator * with full styling control and professional UX design. * * Usage: * * @version 1.0.0 * @author Zeevou Development Team */ if (!function_exists(‘zeevou_container_toc_shortcode’)) { function zeevou_container_toc_shortcode($atts) { // Parse shortcode attributes with defaults $atts = shortcode_atts([ […]

Custom Table of Content Read More »

BreadCrumb

/** * Zeevou Custom Breadcrumb Shortcode * * Usage: * * Parameters: * – font_family: Font family name (default: ‘Inter, system-ui, -apple-system, sans-serif’) * – font_size: Font size with unit (default: ’14px’) * – color: Text color for links (default: ‘#6B7280’) * – hover_color: Hover color for links (default: ‘#7C3AED’) * – separator: Separator character

BreadCrumb Read More »

Flush urls

/** * Final Redirect Fix for Alternatives Migration * Ensures all redirects work correctly * Run once then deactivate */ add_action(‘init’, function() { if (get_transient(‘zeevou_final_redirects_done’)) { return; } // Flush permalinks to activate any API-created redirects flush_rewrite_rules(true); set_transient(‘zeevou_final_redirects_done’, true, HOUR_IN_SECONDS); }, 999); // Add template redirects as backup if API redirects don’t work add_action(‘template_redirect’, function()

Flush urls Read More »

Force Delete Posts

add_action(‘rest_api_init’, function() { register_rest_route(‘zeevou/v1’, ‘/force-delete-post’, [ ‘methods’ => ‘POST’, ‘callback’ => function($request) { if ($request[‘secret’] !== ‘zeevou-create-post-2026’) { return new WP_Error(‘unauthorized’, ‘Invalid secret’, [‘status’ => 401]); } $post_id = $request[‘post_id’]; if (!$post_id) { return new WP_Error(‘missing_id’, ‘Post ID is required’, [‘status’ => 400]); } // First check if post exists $post = get_post($post_id); if (!$post)

Force Delete Posts Read More »

Update Post

add_action(‘rest_api_init’, function() { register_rest_route(‘zeevou/v1’, ‘/update-post’, [ ‘methods’ => ‘POST’, ‘callback’ => function($request) { // Security check if ($request[‘secret’] !== ‘zeevou-create-post-2026’) { return new WP_Error(‘unauthorized’, ‘Invalid secret’, [‘status’ => 401]); } // Get the post ID $post_id = $request[‘post_id’]; if (!$post_id) { return new WP_Error(‘missing_id’, ‘Post ID is required’, [‘status’ => 400]); } // Check if

Update Post Read More »

Redirect Snippet

add_action(‘rest_api_init’, function() { register_rest_route(‘zeevou/v1’, ‘/create-redirect’, [ ‘methods’ => ‘POST’, ‘callback’ => function($request) { if ($request[‘secret’] !== ‘zeevou-redirect-2026’) { return new WP_Error(‘unauthorized’, ‘Invalid secret’, [‘status’ => 401]); } $source = $request[‘source’]; $target = $request[‘target’]; $code = $request[‘code’] ?? 301; // Method 1: Try using Redirection plugin if installed if (class_exists(‘Red_Item’)) { $redirect = Red_Item::create([ ‘url’ =>

Redirect Snippet Read More »

Reviews Rest API Endpoint

/** * Zeevou Reviews Carousel REST Endpoint * Endpoint: /wp-json/zv/v1/reviews-carousel?per_page=30 */ add_action(‘rest_api_init’, function () { register_rest_route(‘zv/v1’, ‘/reviews-carousel’, array( ‘methods’ => WP_REST_Server::READABLE, ‘permission_callback’ => ‘__return_true’, ‘args’ => array( ‘per_page’ => array( ‘default’ => 30, ‘sanitize_callback’ => function ($value) { $value = (int) $value; if ($value < 1) $value = 1; if ($value > 30) $value =

Reviews Rest API Endpoint Read More »

inject Title and Id for Channels and PMS List on Loop Item for Loop Grid

add_action(‘elementor/frontend/widget/before_render’, function( $widget ) { if ( ! $widget instanceof \Elementor\Widget_Base ) { return; } // Read the class from widget settings (NOT from HTML string) $settings = $widget->get_settings_for_display(); $classes = isset($settings[‘_css_classes’]) ? (string) $settings[‘_css_classes’] : ”; // Match full class name safely if ( strpos(‘ ‘ . $classes . ‘ ‘, ‘ zeevou-channels-pms-loop-cta ‘)

inject Title and Id for Channels and PMS List on Loop Item for Loop Grid Read More »

add id to menu items

add_filter(‘nav_menu_link_attributes’, function ($atts, $item, $args) { // Put a class like “id-start-free” in the menu item’s “CSS Classes” field if (!empty($item->classes) && is_array($item->classes)) { foreach ($item->classes as $class) { if (strpos($class, ‘id-‘) === 0) { $atts[‘id’] = substr($class, 3); // “id-start-free” => id=”start-free” break; } } } return $atts; }, 10, 3);

add id to menu items Read More »

Completely Disable Comments

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in post types foreach (get_post_types() as $post_type) { if (post_type_supports($post_type, ‘comments’)) { remove_post_type_support($post_type, ‘comments’); remove_post_type_support($post_type, ‘trackbacks’);

Completely Disable Comments Read More »

Open API Proxy APIs

add_action(‘wp_ajax_proxy_api’, ‘zeevou_openapi_proxy_api’); add_action(‘wp_ajax_nopriv_proxy_api’, ‘zeevou_openapi_proxy_api’); function zeevou_openapi_proxy_api() { // Map: endpoint key => remote URL $allowed_endpoints = [ ‘integration_partner_types’ => ‘https://sandbox.zeevou.com/apis/integration_partner_types’, ‘integration_partners’ => ‘https://sandbox.zeevou.com/apis/integration_partners’, ‘countries’ => ‘https://sandbox.zeevou.com/apis/countries’, ]; $endpoint_key = isset($_GET[‘endpoint’]) ? sanitize_text_field($_GET[‘endpoint’]) : ”; if (!isset($allowed_endpoints[$endpoint_key])) { // Always return consistent JSON error shape + proper status wp_send_json( [‘detail’ => ‘Invalid endpoint’, ‘code’ => ‘invalid_endpoint’,

Open API Proxy APIs Read More »

remove_yoast_schema_for_specific_pages

add_filter( ‘wpseo_json_ld_output’, ‘remove_yoast_schema_for_specific_pages’ ); function remove_yoast_schema_for_specific_pages( $data ) { // List of Post/Page IDs where Yoast Schema should be disabled $disabled_ids = array( 168225, 167878, 170550, 170528, 169910, 169614, 169070, 151686, 85338, 139360, 79148, 94368,7990,108459,171189,171238,171276,171687,100853,84872); // Check if the current view is a single Post OR a Page with an ID in our list if

remove_yoast_schema_for_specific_pages Read More »

load hubspot code for forms deferred

/** * Conditionally load the HubSpot forms script. * * This function enqueues the script on all pages except for single posts, * single ‘giveaway’ custom posts, and a specific list of excluded pages. */ function zeevou_enqueue_hubspot_forms_script() { // — START CUSTOMIZATION — // Add page IDs or slugs to this array to exclude them.

load hubspot code for forms deferred Read More »

enqueue_giveaway_script

/** * Enqueues the giveaway script and localizes the post ID for a child theme. */ function child_theme_enqueue_giveaway_script() { // Check if we are on a single post and the URL contains ‘/giveaways/’ if (is_singular() && strpos($_SERVER[‘REQUEST_URI’], ‘/giveaways/’) !== false) { // Use get_stylesheet_directory_uri() to point to the child theme’s folder. wp_enqueue_script( ‘giveaway-logic’, get_stylesheet_directory_uri() .

enqueue_giveaway_script Read More »

Scroll to Top
Solution lamp for mobile header

Custom Solutions with Zeevou

Discover tailored solutions perfectly suited to your role, business size, and specific use cases.