Is there a better way of handling AJAX requests in WordPress?

Use add_rewrite_rule to make your own API and handle the endpoints yourself. Tools like Monkeyman Rewrite Analyzer will help you understand how your rewrite rules end up working with existing rules. if ( ! class_exists( ‘WPSEAPIEndpoint’ ) ): class WPSEAPIEndpoint { // WordPress hooks public function __construct() { add_filter( ‘query_vars’, array ( $this, ‘add_query_vars’ ), … Read more

translate “load more” button

Your link doesn’t embed translation for the “Load more” string. You need to make a modification. If the code is embed in a php file : _e(‘load more’, ‘your_txt_domain’); If the string to translate is in a js file, you need to use wp_localize_script() function.

change or add css to theme from plugin

I believe you need to add __FILE__ to your plugins_url() function. It may not be calling the right location. It should look like this: add_action( ‘wp_enqueue_scripts’, ‘wpse_238154_register_plugin_styles’ ); function wpse_238154_register_plugin_styles() { wp_enqueue_style( ‘fh-plugin’ , plugins_url( ‘nf-plugin/includes/f-hide.css’, __FILE__ ) ); }

CMB2 field not showing on front end category page

As from here I can see you used a parameter on your cat_sub_title() function but I don’t think you echo manually. you just hooking this function. That’s why it’s not working. Try like this. and there is no need to pass any parameter but if you do please working with that. add_action(‘genesis_before_loop’, ‘cat_sub_title’, 5 ); … Read more

how to change wp-admin url using function file

Please see this one https://wordpress.stackexchange.com/a/4799/64458 and before ask any question do some research first. And after that ask your question/prob with your working source/code. Hey I already mention it that before ask anything please do some homework by your self. That will help you to improve. here is your questions answer https://wordpress.stackexchange.com/a/78258/64458 , if you … Read more

Changing location of “About me” section

In your child theme’s functions.php, add the following: add_filter( ‘widget_text’, ‘do_shortcode’ ); add_shortcode( ‘display-page’, ‘wpse_239714_page_content’ ); function wpse_239714_page_content( $content ) { $thispage = get_post( $content[‘id’] ); return do_shortcode( $thispage -> post_content ); } This will allow you to display the content of any post or page in a shortcode, like so: [display-page id=”PAGE_ID”] Where PAGE_ID … Read more