Category: Admin
Get X – Force Hreflang en-CA
/** * Get X Media – Canada Hreflang (Output Buffering Method) * * @package GetXMedia_Hreflang * @author Get X Media * @version 3.0.1 */ if ( ! defined( ‘ABSPATH’ ) ) { exit; } /** * Inject hreflang tag into…Continue reading
Get X – Clean RankMath Data Extractor
/** * Clean RankMath Data Extractor – No Styling * Universal solution for extracting RankMath Local Business data * Works across any WordPress site with RankMath * Add to WP Code Snippets – PHP Snippet – Run Everywhere * *…Continue reading
Get X – Force RankMath OG Local CA
/** * Get X Media – Force RankMath Canada Targeting (Aggressive) * * @package GetXMedia_RankMath_CA * @author Get X Media * @version 2.0.0 */ if ( ! defined( ‘ABSPATH’ ) ) { exit; } /** * Replace RankMath’s en_US locale…Continue reading
Endre tittel på Post/Innlegg
/************* Change dashboard post to Investering *************/ add_action( ‘init’, ‘cp_change_post_object’ ); function cp_change_post_object() { $get_post_type = get_post_type_object(‘post’); $labels = $get_post_type->labels; $labels->name = ‘Investeringer’; $labels->singular_name = ‘Investering’; $labels->add_new_item = ‘Legg til investering’; $labels->edit_item = ‘Rediger investering’; $labels->new_item = ‘Ny investering’; $labels->view_item…Continue reading
Ny Status – Utgått side
function register_expired_post_status() { register_post_status(‘expired’, array( ‘label’ => _x(‘Utgått’, ‘post’), ‘public’ => false, ‘exclude_from_search’ => true, ‘show_in_admin_all_list’ => true, ‘show_in_admin_status_list’ => true, ‘label_count’ => _n_noop(‘Utgått (%s)‘, ‘Utgåtte (%s)‘), )); } add_action(‘init’, ‘register_expired_post_status’); function add_expired_to_post_status_dropdown() { echo ‘‘; } add_action(‘admin_footer-post.php’, ‘add_expired_to_post_status_dropdown’); add_action(‘admin_footer-post-new.php’,…Continue reading
GTM Injection + Expose login state via .php
/** * GTM injection with admin exclusion (WordPress) * – Admins (manage_options) get NO GTM at all * – Everyone else gets GTM head + noscript * – Exposes login/admin state to the browser early */ if ( ! defined(…Continue reading
Untitled Snippet
Untitled Snippet
Prevent Powerpack Off Canvas from Breaking JavaScript loading
add_filter( ‘pp_offcanvas_body_inner_wrap’, ‘__return_false’ );Continue reading