How to show active version on wordpress.org of a published plugin?

For the current version, make sure you include the Version attribute in your plugin header file. Like this: /* Plugin Name: WordPress.org Plugin Plugin URI: https://developer.wordpress.org/plugins/the-basics/ Description: Basic WordPress Plugin Header Comment Version: 2.3.0 Author: WordPress.org Author URI: https://developer.wordpress.org/ License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html Text Domain: wporg Domain Path: /languages */ For more detail check … Read more

add_rewrite_rule works in themes function php but when moved into plugin it stops working

When a plugin is activated, the activation hook is the only code that runs on that request. If you flush rewrite rules on activation, your rule isn’t in the array of rules that everything gets rebuilt from, unless you explicitly add it first in the activation hook. register_activation_hook( __FILE__, ‘myplugin_flush_rewrites’ ); function myplugin_flush_rewrites() { // … Read more

What is the best way to embed an JS App in a WordPress Page?

Make the public page a template and then target it with is_page_template() How to create a page template. in your functions.php something like: function wp_25271() { if (is_page_template(‘page-public.php’)) { wp_enqueue_script(‘bootcards’, ‘https://cdnjs.cloudflare.com/ajax/libs/bootcards/1.1.2/fonts/icomoon.svg’, array(‘jquery’), ”, true); } add_action(‘wp_enqueue_scripts’, ‘wp_25271’);

How can I pass get_the_author_meta(‘user_email’) through the REST API?

Why I Don’t Have Access to Post’s Information? When you are using Admin-AJAX or the REST API, you will only have access to the current user’s data (by that I mean by default, such as using is_user_logged_in()). To retrieve any other information, you have to pass it as an argument in your AJAX request. WordPress … Read more

How To Change Logout Screen Title

First of all, if you see this page it means you’re doing logout in a wrong way. The check_admin_referer() fails and calls wp_nonce_ays(), thus prompting for a confirmation (ays = Are You Sure?). See these threads for more details: How to log out without confirmation ‘Do you really want to log out?”? WordPress failure when … Read more