Use a custom ID prefix in Table of Content block
add_filter( ‘aioseo_toc_hash_prefix’, function( $prefix ) { return ‘mysite-‘; } );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘aioseo_toc_hash_prefix’, function( $prefix ) { return ‘mysite-‘; } );Continue reading
add_filter( ‘manage_posts_columns’, function ( $columns ) { $columns[‘last_modified’] = __( ‘Last Modified’ ); return $columns; } ); add_action( ‘manage_posts_custom_column’, function ( $column, $post_id ) { if ( ‘last_modified’ === $column ) { $modified_time = get_the_modified_time( ‘Y/m/d g:i:s a’, $post_id );…Continue reading
global $post; $author_id = $post->post_author; // Get author’s display name and biographical info $author_name = get_the_author_meta( ‘display_name’, $author_id ); $author_bio = get_the_author_meta( ‘description’, $author_id ); // Get author’s avatar $author_avatar = get_avatar( $author_id, 96 ); // Only display if author…Continue reading
add_filter( ‘pre_load_textdomain’, ‘__return_false’, -5 ); add_filter( ‘pre_load_script_translations’, ‘__return_false’, -5 );Continue reading
/** * Assigns a specific WordPress user role based on the selected value in a WPForms multiple-choice field. * * @link https://wpforms.com/how-to-assign-user-roles-conditionally-in-wordpress/ * * @param array $user_data Array containing user registration data. * @param array $fields Array of form fields…Continue reading
function enqueue_admin_reorder_scripts() { global $pagenow; // Ensure the script is not loaded on the plugins page if ($pagenow !== ‘plugins.php’) { wp_enqueue_script(‘jquery-ui-sortable’); wp_add_inline_script(‘jquery-ui-sortable’, ‘ jQuery(document).ready(function($) { var $sortableList = $(“#the-list”); var postType = $(“body”).attr(“class”).match(/post-type-([^s]+)/)[1]; $sortableList.sortable({ update: function(event, ui) { var…Continue reading
function enqueue_admin_reorder_scripts() { global $pagenow; // Ensure the script is not loaded on the plugins page if ($pagenow !== ‘plugins.php’) { wp_enqueue_script(‘jquery-ui-sortable’); wp_add_inline_script(‘jquery-ui-sortable’, ‘ jQuery(document).ready(function($) { var $sortableList = $(“#the-list”); var postType = $(“body”).attr(“class”).match(/post-type-([^s]+)/)[1]; $sortableList.sortable({ update: function(event, ui) { var…Continue reading