ifrtest
123

There are various ways to get user_ID in WP. But which one is the fastest ? I’ve compared 3 ways function get_uid_from_global() { global $current_user; return $current_user->ID; } function get_uid_by_gcuid() { return get_current_user_id(); } function get_uid_by_wpgcu_id() { return wp_get_current_user()->ID; } Without a doubt, global method was fastest. With multiple 100,000 runs, global method took 0.9~…
I ve searched low and high for this came across a lot of tips but none of them worked. Changing the “default beep” to (none) did nothing for me, it simply delegated to “exclamation” sound which was even worse. Best I could come up with was changing the “exclamation” sound to feed discovered 🙁 it…
If you are familiar with WordPress, you should already know that you should almost never have to use get_posts(). Your best bet is to use WP_Query . As good as wp_query is, you should still fine-tune it depending on your needs, it does make a difference. For example, if you just need 1 random post…
Disable comments, pings trackbacks etc.. Set media sizes – optionally disable monthly based archiving. Set-up a functionality plugin for the site (add GA code, manage image_sizes, remove query string from sources etc.) . Permalink structure. Move wp-config. Modify wp-config define( ‘WP_POST_REVISIONS’, 3 ); Install favorite plugins Google Maps Easy Yoast SEO Contact Form 7 Create…
Long story short: BAD IDEA, don’t. It’s widely recommended to edit some of the spam comments -removing the spam url and editing comment content to something more related- and approving them in order to gain you some SEO advantage.It’s supposed to give you SEO advantage if your article has more comments (You could fake it…
I needed a placeholder for tags input but it’s boring to display the same tags every time. But unlike posts, WP doesnt have “rand” orderby paramater. So what you can do; is to get a #no of tags and shuffle them. So basically what we do is: Check if we have a recent transient If…