Duplicate Post/Page Link (copy)

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

TEMPLATE Admin – Support Ticket Page

add_action(‘admin_menu’, ‘register_support_tickets_page’); function register_support_tickets_page() { add_menu_page( ‘Support Tickets’, // Page title (appears in tag) ‘Support Tickets’, // Menu title (appears in the sidebar) ‘edit_posts’, // Capability required to access ‘support-tickets’, // Menu slug (used in URL) ‘support_tickets_page_html’,// Callback function to…Continue reading

TEMPLATE Admin – Dashboard Welcome Widget

add_action(‘wp_dashboard_setup’, function() { wp_add_dashboard_widget( ‘custom_widget_welcome’, ‘Welcome’, ‘custom_dashboard_widget_welcome_display’ ); }); function custom_dashboard_widget_welcome_display() { $current_user = wp_get_current_user(); $display_name = esc_html($current_user->display_name); // EDIT SITE SPECIFIC DETAILS BELOW echo ‘ ‘; echo ‘ Hi ‘ . $display_name . ‘ 👋 ‘; echo ‘ Here…Continue reading

TEMPLATE Admin – Restrict Access to Docs

// Restrict access to Docs page function restrict_page_to_logged_in_users() { // EDIT SITE SPECIFIC PAGE ID HERE $restricted_page_id = 390; // Check if the current page is the restricted page and if the user is not logged in if (is_page($restricted_page_id) &&…Continue reading

Admin – Docs Menu Item

// Add Menu Link add_action(‘admin_menu’, ‘add_docs_link’); function add_docs_link() { add_menu_page( ‘Documentation’, // Page title (not used, but required) ‘Documentation’, // Menu title (shows in admin sidebar) ‘edit_posts’, // Capability required ‘docs-redirect’, // Unique slug ‘redirect_to_docs’, // Callback function ‘dashicons-editor-ul’,// Optional…Continue reading

Duplicate Post/Page Link

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Make Elementor Default Editor

/** * Comprehensive solution to make Elementor the default editor * while keeping the “Edit with Elementor” option */ /** * Redirect default WordPress editor to Elementor editor */ function redirect_default_editor_to_elementor() { global $pagenow; // Check if we’re on the…Continue reading