How to force Cover block to use the full size image resolution
How to force Cover block to use the full size image resolution
How to force Cover block to use the full size image resolution
If you want to implement custom field-wise search functionality in the WordPress admin area
post_content return zero!
A user posted several correction ideas; unfortunately, they were deleted, but I managed to remember some things and apply them to the code. The 404 error no longer appears; now it generates the following: Try deleting cookies. ERR_TOO_MANY_REDIRECTS add_filter(‘post_link’, ‘custom_permalink’, 10, 3); function custom_permalink($permalink, $post, $leavename) { $categories = get_the_category($post->ID); $news_category = array_filter($categories, function ($category) … Read more
How to change product title color in shop page if product has specific product tag (Woocommerce)?
Found the answer thanks to Jacobs comments + this similar thread: I had to use remove_action() WITH matching priority, like this: function booking_meta( $post_id, $post, $update ) { if ( get_post_type( $post_id ) !== ‘booking’ ) { return; } // Update ACF fields $object_id = get_the_ID(); $owner_id = get_the_author_meta( ‘ID’, $post->post_author ); update_field( ‘object’, $object_id, … Read more
Assuming that I have the utility plugin, and the my_error_log() function is there, how can I call it from anywhere in my other plugins? By calling it, there are no special steps How can I be sure I can call it? Are plugins functions available across my WordPress code? Yes, plugins are not sandboxed, everything … Read more
How to cache results of of get_available_post_statuses() function as it is causing a slow query on a website with over 1 million posts?
disable a specefic sidebar when user is log out
Thanks to @TomJNowell’s hint I managed to get it working with a simple check if the post already exists (using the post_exists function). This code is included in the functions.php file. Additionally, the loop only runs if called from the backend using the is_admin function. Here’s the working example: function ekesto_insert_post(){ // config $post_type=”event”; // … Read more