How to update post_modified FAST after each comment?

One of my ways of keeping my posts up to date is to update the post_modified value after some of certain actions like commenting, liking… You shouldn’t use wp_update_post() because it calls wp_insert_post(), which determines that the post exists and sets the post_modified and post_modified variables to the current date. This process will take way… Continue reading How to update post_modified FAST after each comment?

Published
Categorized as Wordpress

How to return wp_login_form(), not echoing

If you’re using wp_login_form() inside a custom function and you don’t want wp_login_form() to echo, which is by default, you shoud set the echo to false as following: Where Do I Put This Code? This code should be placed in the functions.php file of your active theme or a custom functions plugin.

Published
Categorized as Wordpress

Add register/forgot password links to wp_login_form()

If you want to build a custom login page by using the builtin WP function wp_login_form(), you will notice that there is no register or forgot password link. If you want to take them back, just hook these links as following: There are 3 hooks available: login_form_top login_form_middle login_form_bottom Where Do I Put This Code? This… Continue reading Add register/forgot password links to wp_login_form()

Published
Categorized as Wordpress

Get the most recent tags in WordPress (Shortcode)

Update: Better one here https://voila-blog.com/mysql-get-tags-taxonomy-by-recent-posts-in-wordpress-db/ (MySQL) If you want to display the most recent tags in WordPress, apply this code to the current theme’s functions.php In my case, I will get 20 most recent tags by using the shortcode: [most_recent_tags limit=20]

Published
Categorized as Wordpress