Have multiple local wordpress installs share a wp-content folder and database

For wp-content folder you need to add WP_CONTENT_DIR with path to this folder to each wp-config.php file of each your sites. All of these WP_CONTENT_DIR constants should have the same path to one folder. Read more about it here: http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content To share the same database, you just need to setup the same database settings in … Read more

Making a configurable field translatable

What I have seen in translation plugins (qTranslate, WPML, Multilingual Press) are two approaches. One is qTranslate’s (and the defunct xLanguage): use one field (one for title, other for content, etc) to hold all translations. And then, in the front end, decode its output according to the actual language. <!–en–>English<–:–><!–es–>Español<–:–> In the back end, the … Read more

Custom editor field displaying HTML in Visual editor

I found out I needed to add html_entity_decode() around the value so my final code is… /** * Add Copyright text to general settings menu */ $custom_general_settings = new FD_Custom_General_Settings(); class FD_Custom_General_Settings { function __construct() { add_filter(‘admin_init’, array(&$this , ‘register_fields’)); } function register_fields() { register_setting(‘general’, ‘footer_text’, ‘esc_attr’); add_settings_field(‘footer_text’, ‘<label for=”footer_text”>’.__(‘Footer Text’ , ‘footer_text’ ).'</label>’ , … Read more

How to build custom WP admin with custom URLs

WordPress has some pretty solid documentation for this. What you are asking for will require that you learn a good bit of programming. Check out here for basic plugin development information: https://codex.wordpress.org/Writing_a_Plugin This page has specific information about making your own administration panels: https://codex.wordpress.org/Adding_Administration_Menus If this is something you are passionate about I would consider … Read more

Get multiple shortcode attribute values

Don’t try to shove everything into a single attribute, or a single shortcode even. The string parsing you have to do will get more and more complicated. Try this: function myshortcode_cb( $atts ) { $atts = shortcode_atts( array( ‘cat’ => ”, ‘title’ => ” ), $atts ); // var_dump($atts); // debug return “{$atts[‘cat’]} :: {$atts[‘title’]}”; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)