Limiting number of related posts

Build an array of categories: foreach ($categories as $category) { $cat[] = $category->cat_ID; } Then pass that to the query: $args=array( ‘category__in’ => $cat, ‘order’ =>DESC, ‘post__not_in’ => array($post->ID), ‘posts_per_page’=>2, ); In other words, put the query after the foreach, not inside of it.

Increase 10 post limit per page

It seems your theme (or one of your plugins) has reduced the query to 10 posts per page.Otherwise, changing the option in the Settings page has to change the number of posts per page. Check code of your theme and remove posts_per_page parameter of queries (If queries have been modified, and this parameter was set). … Read more

Limit 1 global comment per minute

Place the following into a custom plugin or into your child theme’s functions file: add_action(“wp_insert_comment”, function() { global $current_user; if ( !$current_user->ID ) return; update_user_meta( $current_user->ID, “se_last_commented”, time() ); }); add_action(“init”, function() { if ( “wp-comments-post.php” == $GLOBALS[‘pagenow’] ) { global $current_user; if ( !$current_user->ID ) return; $last_commented = (int) get_user_meta( $current_user->ID, “se_last_commented”, 1 ); … Read more

Limit tag selection to predefined list

You will certainly receive many answers. This question is very good. We are speaking about the tags when you try to type them for a new post, for instance in the Dashboard. When you type the tags, you get the proposals. I think this is a good feedback. However, it could be possible to create … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)