Home Page Meta Refresh

/** * Homepage Freshness Signals — Rank Math (Universal) * * Drop-in snippet for any WordPress + Rank Math news site. * No site-specific prefixes or configuration needed. * * – Overrides the homepage OG image with the latest post’s…Continue reading

Exclude Specific Products from Parent Category

/** * Exclude specific products from appearing in their parent category. */ add_action(‘woocommerce_product_query’, ‘exclude_specific_products_from_parent_category’); function exclude_specific_products_from_parent_category($q) { // Only apply this on the parent category archive page if (!is_product_category(‘telt-og-pavilloner’)) { // Replace with your parent category slug return; } //…Continue reading

Profile Grid Panel (PHP)

if ( ! defined( ‘ABSPATH’ ) ) exit; /* ——————————————————— * EDIT THESE IF YOUR PG PAGE SLUGS DIFFER * ——————————————————— */ function lts_pg_login_url() { return site_url( ‘/login/’ ); // Change if your ProfileGrid login page slug is different }…Continue reading

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

ByUs Global – Gravity forms entries access to editors

add_action( ‘init’, function() { $role = get_role( ‘editor’ ); if ( ! $role ) return; $caps = [ ‘gravityforms_view_entries’, ‘gravityforms_edit_entries’, ‘gravityforms_delete_entries’, ‘gravityforms_export_entries’, ‘gravityforms_view_entry_notes’, ‘gravityforms_edit_entry_notes’, ]; foreach ( $caps as $cap ) { $role->add_cap( $cap ); } } );Continue reading

ByUs global – Add WPRocket for Editors

function byus_add_cache_capability_to_editors() { $role = get_role(‘editor’); if ($role) { $role->add_cap(‘rocket_purge_cache’, true); } $role2 = get_role(‘shop_manager’); if ($role2) { $role2->add_cap(‘rocket_purge_cache’, true); } } add_action(‘init’, ‘byus_add_cache_capability_to_editors’);Continue reading