how to force tag page layout to use same as search layout?

You can tell WordPress to use the search.php template whenever viewing tags by using the template_include. It works like this: function wpse_240429() { // IF we’re planning on loading a tag template if( is_tag() ) { // Try to locate the search.php template $search_template = locate_template( ‘search.php’ ); // If the search template exists if( … Read more

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

_prime_post_caches in wordpress

These bits of caching are generally considered inadvisable to be messed with. If I remember right you can somewhat control the behavior by query arguments and wrapping related code in wp_suspend_cache_addition() calls. From look through the source it doesn’t seem to be meant to carry custom logic. If you would like similar behavior for your … 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

Plugin usage wordpress

In a commercial website under wordpress, can I use a wordpress plugin under GPLv2 ? Yep. Note that we’re now up to GPLv3 and other variations. There are certain types of limitation to the so-called “copyleft” license, but they don’t bear on the “normal” type of usage you’re referring to. The Wikipedia entry looked pretty … Read more

Errors when trying to use a plugin to write to the database

You should never have to read wp-config to get database credentials. WordPress has built-in functions which are generally more secure for this sort of operation. In your plugin, simply call global $wpdb; and you will be connected to the WP database. You can then perform whatever queries you need – select, update, add, etc. For … Read more