Activate my plugins via FTP

Try the below mysql query to activate your plugin: UPDATE wp_options SET option_value=”a:22:{i:0;s:19:”akismet/akismet.php”;i:1;s:58:”contact-form-7-to-database-extension/contact-form-7-db.php”;i:2;s:36:”contact-form-7/wp-contact-form-7.php”;i:3;s:27:”js_composer/js_composer.php”;i:4;s:23:”revslider/revslider.php”;i:5;s:23:”soliloquy/soliloquy.php”;i:6;s:27:”updraftplus/updraftplus.php”;i:7;s:41:”wordpress-importer/wordpress-importer.php”;i:8;s:24:”wordpress-seo/wp-seo.php”;i:9;s:25:”wp-smushit/wp-smushit.php”;i:10;s:33:”x-content-dock/x-content-dock.php”;i:11;s:29:”x-custom-404/x-custom-404.php”;i:12;s:39:”x-disqus-comments/x-disqus-comments.php”;i:13;s:39:”x-email-mailchimp/x-email-mailchimp.php”;i:14;s:43:”x-facebook-comments/x-facebook-comments.php”;i:15;s:41:”x-google-analytics/x-google-analytics.php”;i:16;s:43:”x-olark-integration/x-olark-integration.php”;i:17;s:29:”x-shortcodes/x-shortcodes.php”;i:18;s:35:”x-smooth-scroll/x-smooth-scroll.php”;i:19;s:45:”x-under-construction/x-under-construction.php”;i:20;s:29:”x-video-lock/x-video-lock.php”;i:21;s:31:”x-white-label/x-white-label.php”;}” WHERE option_name=”active_plugins”; But as you say ‘determine a plugin conflit and ended up breaking my site’ I suggest you to follow below steps: 1 De-activate All Plugins via phpmyadmin In the options table, find the option_name column and find find the line … Read more

Excecuting php function in shortcode

This will probably not work, or work in unexpected way. Shortcodes should probably be displayed only on a “post” single page. Using a shortcode in the way you want will either make the breadcrumbs not to be displayed on archive pages or have them displayed there multiple times or wrong places. What you should do … Read more

Plugin PHP file gives error 500 [closed]

The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site’s server. You have to enable the debug true to understand what is the problem. Open the wp-config.php file. To enable debugging mode, change define(‘WP_DEBUG’, false); line to the define(‘WP_DEBUG’, true); in wp-config.php file. … Read more

Creating a CSV with PHP inside the plugin directory

If you plan to write to a pugin folder since you used fopen, fwite, flose you are using the wrong function: File: wp-includes/link-template.php 3189: /** 3190: * Retrieves a URL within the plugins or mu-plugins directory. 3191: * 3192: * Defaults to the plugins directory URL if no arguments are supplied. 3193: * 3194: * … Read more

Remove the last X characters of a custom field value

You have to consider that you’re dealing with substr() a string related function as the str in the function name indicates. That does mean that the parameter $string you give actually has to be of the type string. get_post_meta() on the other hand does just give you back whatever type you saved in the first … Read more

Display most popular posts of category

How about adding ‘cat’=> 10 to your query? $new_query = new WP_Query( array( ‘posts_per_page’ => $carousel_count, ‘meta_key’ => ‘wpb_post_views_count’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘DESC’, ‘monthnum’=> $month, ‘year’=> $year, ‘cat’=> 10 ));