Login Page Styles
add_action(‘login_head’, ‘login_page_styles’); function login_page_styles(){ ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
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
add_filter( ‘wfea_combined_date_time_date_format’, function ( $format ) { return ‘jS F’; }, 10, 1 );Continue reading
add_filter( ‘wfea_combined_date_time_time_format’, function ( $format ) { return ‘g:i a’; }, 10, 1 );Continue reading
add_filter( ‘wfea_event_url’, function ( $url, $event_id, $organizer, $venue, $category ) { $code = ‘online’; if ( property_exists( $venue, ‘id’ ) ) { switch ( $venue->id ) { case 12345: $code = ‘venue1’; break; case 999893: $code = ‘venue2’; break; default:…Continue reading