Install and Update plugins on a VPS WordPress installation

Sorry for posting the question above, I fixed it right after posting here, by following these steps I found on this site http://artofsimplicity.co.uk/wordpress-ftp-auto-upgrade-on-ubuntu sudo apt-get install vsftpd sudo useradd wordpress sudo passwd wordpress # set password for wordpress when prompted. sudo usermod -g www-data wordpress sudo chmod -R g+w /var/www sudo chown -R www-data:www-data /var/www … Read more

How to install plugin only from PHP file?

Your plugin isn’t visible because you haven’t provided a Plugin Name in your header. Change Name to Plugin Name and it’ll show up. You’re also missing a few lines in your header, if that’s a concern to you. It’s best to just follow the example provided in the codex: <?php /** * Plugin Name: Name … Read more

Proper way to replace the_content only for pages created by custom plugin

You need to return the filtered content, try like this: add_filter(‘the_content’, ’emd_content’); function emd_content( $content ) { if ( is_page(‘Member Directory’) ) { include dirname( __FILE__ ) . ‘/content-members.php’; } elseif ( is_page(‘Contact Members’) ) { include dirname( __FILE__ ) . ‘/content-member-contact-form.php’; } else { return $content; } } But the better way is to … Read more

Integrating jQuery Datatables with Editor into wordpress admin

Both DataTables Editor and WordPress are trying to use the same reserved parameter, ‘action’. WordPress is using $_REQUEST[‘action’] to route the request in admin-ajax.php line 86. DataTables Editor is using $_POST[‘action’] to tell the server-side processing script what action to apply ( insert / delete / update – see: https://editor.datatables.net/manual/server ) This would work fine … Read more

Create shortcode to echo javascript

First of all, it looks like you are trying to enqueue version 2.2.4 of jquery, under the condition that jquery has already been loaded. That doesn’t look good. Secondly, you can’t just echo a script in a shortcode. You must add it to another script using wp_add_inline_script. Like this: function wpse238227_custom_shortcode23() { wp_enqueue_script(‘script-typed’, ‘https://www.example.comwp-content/themes/mediso-v1-03/typed.js’, array(‘jquery’)); … Read more

How to set Noindex to all wordpress pages in a catergory?

As the previous code I posted didnt work for the OP, clutching at straws, we can try to obtain the same outcome using get_the_category As the OP stated he was using YOAST, i’ll wrap this function into the YOAST hook for robots. add_filter(‘wpseo_robots’, ‘yoast_no_home_noindex’, 999); function yoast_no_home_noindex($string= “”) { $term_id = get_the_category( $post->ID ); if($term_id[0]->term_id … Read more