Category: Admin
Optimize Search Results
// 1. Exclude pages from search results function exclude_pages_from_search($query) { if (!is_admin() && $query->is_search && $query->is_main_query()) { $query->set(‘post_type’, ‘post’); } return $query; } add_action(‘pre_get_posts’, ‘exclude_pages_from_search’); // 2. Search only titles and excerpts (exclude post content) function search_title_excerpt_only($search, $wp_query) { global…Continue reading
Optimize Font Loading
@font-face { font-display: swap; }Continue reading
Plain Upcoming Events List Shortcode
/** * Bare, theme-friendly list of upcoming events. * * The Events List block bakes in an title and calendar icons and is hard * to restyle. This snippet adds a shortcode that outputs a plain, one-line-per * event list…Continue reading
Use Tag Slugs in the Sugar Calendar Events List Shortcode
/** * Allow tag slugs in the sugarcalendar_events_list shortcode. * * Sugar Calendar’s shortcode only accepts term IDs in the `tags` attribute. * This filter intercepts the raw shortcode attributes before the sanitized * (now-empty) value is used, resolves any…Continue reading
RP Global CSS Snippets Across Site
// Program Page Template – page settings custom CSSContinue reading
Calcul distance Cergy
Disable Deactivation Links
add_filter( ‘plugin_action_links’, ‘disable_all_plugin_deactivation’, 10, 4 ); function disable_all_plugin_deactivation( $actions, $plugin_file, $plugin_data, $context ) { if ( get_current_user_id() !== 1 ) { // Replace 1 with your admin user ID unset( $actions[‘deactivate’] ); } return $actions; }Continue reading
om trigger alt conversion
Check out our latest guide!Continue reading
om-trigger-conversion class on submit button
First Name Email AddressContinue reading