How do I use wp_editor() in widget form?

I stumbled across this solution a while back; this might be what you are looking for: I added this to my theme’s functions.php file… // First, I created a shortcode for a function, that would typically be inserted in to a template file, so that it could be inserted in to a widget. add_shortcode(‘myshortcode’, ‘myfunction’); … Read more

How to change upload dir for custom plugin?

IN YOUR wp-config.php define(‘MY_’, “https://wordpress.stackexchange.com/”); define(‘MY_DIR’,’ui’); define(‘MY_DIR_PLUGINS’, ‘plugins’); define(‘MY_DIR_CONTENT’, ‘resource’); define(‘MY_DIR_MEDIA’, ‘media’); define(‘MY_PAGE_TYPE’, ‘http://’); if ( !defined(‘ABSPATH’) ) define(‘ABSPATH’, dirname(__FILE__) . MY_. MY_DIR); define(‘WP_HOME’,MY_PAGE_TYPE.$_SERVER[‘HTTP_HOST’]); define(‘WP_SITEURL’,WP_HOME. MY_.MY_DIR); //URL DE CONTENIDO: define(‘WP_CONTENT_URL’,WP_SITEURL.MY_.MY_DIR_CONTENT); define(‘WP_CONTENT_DIR’,realpath(ABSPATH.MY_.MY_DIR_CONTENT)); //CAMBAIR RUTA DE PLIGINS: define( ‘WP_PLUGIN_URL’,WP_SITEURL.MY_.MY_DIR_PLUGINS); define( ‘WP_PLUGIN_DIR’,realpath(ABSPATH.MY_DIR_PLUGINS)); //CAMBIAR RUTA DE SUBIDA define(‘UPLOADS’, ”.MY_DIR_CONTENT.MY_.MY_DIR_MEDIA); /** Sets up WordPress vars and included files. */ require_once(ABSPATH … Read more

Qtranslate + Woocommerce (multiple tinymce) [closed]

Do you absolutely have to use qTranslate to do it? If not, read the official documentation for recommended method of translation: http://docs.woothemes.com/document/woocommerce-localization/ Also try any plugin that is made to integrate with WooCommerce such as WPML. Fixing compatibility between two plugins that is not integrated is not really worth the trouble. They are going to … Read more

add_action does not call the function

Currently it doesn’t seem to exist a filter to manage fields in the menu creation. On the other hand, what you can do is to create a new “menu walker”, to provide WordPress input fields as well as adding your own. That involves the extension of WordPress class Walker_Nav_Menu_Edit with your own code. Since the … Read more

How do I apply style to each category of a list?

I’ve modified your code to reflect the wp_list_categories() function reference as suggested by @Usce. This snippet will create an unordered list, remove the “Categories” list title, and add the li class with individual category ID so you can target each link in the list. function catting ($atts, $content = null) { echo ‘<div id=”cats” class=”catting”>’ … Read more

How to call plugin functions in a custom template

There can be various reason for the undefined function error: The plugin might load its function definitions later than template_include or in the admin backend only. You might have made a syntax error, for example if the plugin is using a namespace, but you are calling the function without that namespace. Or the function is … Read more