/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading
/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading
add_filter(“get_user_option_admin_color”, “update_user_option_admin_color”, 5); function update_user_option_admin_color($color_scheme) { $color_scheme = “modern”; // Options are: // fresh // light // blue // coffee // ectoplasm // midnight // modern // ocean // sunrise return $color_scheme; }Continue reading
add_action(‘login_head’, ‘login_page_styles’); function login_page_styles(){ ?>Continue reading
function customSections_admin_menu() { add_menu_page( ”, // Page Title ‘Custom Sections’, // Menu Title ‘manage_options’, // Capabiliy required to see the menu ‘#’, // Menu_slug – # kills the link so we don’t end up somewhere strange since this is just…Continue reading
// Register the new image sizes in WordPress add_theme_support( ‘post-thumbnails’ ); add_image_size( ‘image-480’, 480, 9999 ); add_image_size( ‘image-720’, 720, 9999 ); add_image_size( ‘image-1440’, 1440, 9999 ); add_image_size( ‘image-1920’, 1920, 9999 ); // Include the new image sizes in the Add…Continue reading
// Remove roles // https://wpmudev.com/blog/wordpress-delete-user-roles/ // Keep Subscriber so we have a default for new logins // Keep Editor so we have it to clone for Site Admin below $wp_roles = new WP_Roles(); $wp_roles->remove_role(“contributor”); $wp_roles->remove_role(“author”); add_action(‘init’, ‘cloneRole’); function cloneRole() {…Continue reading
add_filter(‘aioseo_schema_output’, ‘change_schema_type_in_specific_categories’); function change_schema_type_in_specific_categories($schema) { // Specify the category slugs you want to target $target_category_slugs = array(‘category1-slug’, ‘category2-slug’, ‘category3-slug’); foreach ($schema as &$schemaItem) { // Check if the post belongs to any of the specified categories if (isset($schemaItem[‘@type’]) && ‘NewsArticle’…Continue reading
// This code snippet provides dynamic data to a // In use for Elementor Templates // – Active Templates: Vendor Taxonomy Archive // – Vendor Taxonomies: Vendor Location, Vendor Zone, Vendor Pricing, Vendor Identity Attributes, Vendor Categories // Reference URL…Continue reading
add_filter( ‘wfea_event_time’, function ( $event_time, $start, $end ) { // do you stuff to update $event_time return $event_time; }, 10, 1 );Continue reading