WP_Query->get_posts() take too long time to load data maybe 33 sec
WP_Query->get_posts() take too long time to load data maybe 33 sec
WP_Query->get_posts() take too long time to load data maybe 33 sec
To be honest, I’m not sure if you can trust this plugin 100%. I run the test on my plugin, that is already in repo, and it showed me few false alarms. I put your code inside my plugin code and run the test again and… it didn’t show me the error you have. Also, … Read more
Delayed server responses when logged in on one browser (any browser!) for a while
Use ClassicPress: a fork of WordPress before Gutenberg was added to core, and is actively maintained and improved (latest version: June 2024), though not as frequently as WordPress (reduced community size).
It’s going to be very hard to answer this question without the URL – if you can share the URL you are working with it would be more helpful. To me it sounds like you had previously created a static page for your blog and set it under Settings > Reading so that you could … Read more
I have approached this situation by using jQuery and CSS (this is code from a project that’s been in production for a few years that I generalized): // Admin Styles function style_custom_taxonomy_admin() { if (is_admin() && $_GET[‘taxonomy’] === ‘TAXONOMY’) { add_action(‘admin_footer’, function() { echo ‘<style>/* Custom admin styles */</style>’; echo ‘<script>jQuery(document).ready(function($){ $(“h2:contains(\”Heading to be hidden\”)”).length.remove(); … Read more
A news category can work great, but if you want to keep the news section separate from your main blog (homepage) it will require custom code to exclude it and it also leaves you with little room for customization. I would personally recommend creating a custom post type. I made a free plugin that makes … Read more
you can do that on php side with this hook : // the 2nd “post” of the hook is the post type add_action(“save_post_post”, function ($post_id, $post, $update) { if ($update) { // a post is updated return; } if (!isset($_GET[“preset_category”])) { return; } $term = get_term($_GET[“preset_category”]); if (isset($term)) { wp_add_object_terms( $post_id , $term->term_id , $term->taxonomy … Read more
You should be able to order your posts by adding the following to your main args: ‘meta_key’ => ‘date’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, Example: $args_post = array ( ‘post_type’ => ‘post’, ‘posts_per_page’ => -1, ‘fields’ => ‘ids’, ‘meta_key’ => ‘date’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘tipo-de-contenido’, … Read more
This modified version of your code works perfectly for me: function test_login() { if ( empty( $_GET[‘uname’] ) || is_user_logged_in() ) { return; } $user = wp_signon( [ ‘user_login’ => sanitize_text_field( wp_unslash( $_GET[‘uname’] ) ), ‘user_password’ => ‘password’, ‘remember’ => true, ] ); if ( is_wp_error( $user ) ) { wp_die( $user->get_error_message() ); } else … Read more