Embeds (YouTube, Spotify) Work Live but Won’t Load in Block Editor [closed]
I fixed my own issue by clearing my browser cache. (Ugh. It’s always the simplest thing that I miss.)
I fixed my own issue by clearing my browser cache. (Ugh. It’s always the simplest thing that I miss.)
In WordPress 6.7, usernames are limited to 60 characters, and this value is hard-coded with no filter (source), so no proper way to change it. Allowing more than 60 characters would mean changing core, which is bad practice.
WP stores URLs in a lot of different tables. You can either use a WP CLI command to search and replace the old URL to your new local URL, or use a plugin to do the same thing. Don’t just go do a blanket search-and-replace in phpMyAdmin or similar because the URLs are stored in … Read more
The pre_get_posts filter can be used to change query parameters (untested): add_action( ‘pre_get_posts’, static function ( $query ) { if ( is_admin() ) { return; } if ( ! $query->is_main_query() ) { return; } if ( ! $query->is_home() ) { return; } $query->set( ‘orderby’, ‘title’ ); } );
The issue arises because the is_user_logged_in() function relies on the authentication cookies being recognized by the WordPress request lifecycle. When you set the authentication cookies using wp_set_auth_cookie(), they are sent to the browser, but they are not yet available to the same request that initiated the cookie setting. The cookies will only be recognized on … Read more
After posting the same question to multiple AI chatbots, CoPilot finally gave me an answer that works for both: add_action( ‘pre_get_posts’, ‘filter_files_admin_columns’ ); function filter_files_admin_columns( $query ) { if ( !is_admin() || ‘eri-files’ !== $query->get( ‘post_type’ ) ) { return; } add_filter( ‘posts_search’, ‘custom_search_query’, 10, 2 ); function custom_search_query( $search, $wp_query ) { global $wpdb; … Read more
Part 1 Ans: I am presuming you have added the custom post type yourself, in which case it is easy. When you register a new post type, you can set any rewrite rules for that post type to follow as part of the arguments used in the register_post_type( ‘name’, $args ) function. If your post … Read more
Blocking access to things that should never be directly accessed is always the best solution.
In the block query settings, it has “inherit”:true. This means the rest of the parameters are ignored and instead the global query is used. You could consider setting inherit to false, or otherwise use filter hooks to change the query as needed, such as pre_get_posts.
The Twenty Ten screenshot calendar UI in the screenshot comes from WordPress core’s Calendar Widget. Though the main crux of the widget display comes from the get_calendar() function, which is actually responsible for the output of the calendar itself.