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

Widgets vs. Theme Mods

In short: It depends. Widget go into a widget area. But that also means that when you create a widget area any widget can be put there as well as any number of widgets. So if you’d make the logo a widget a user could put twenty different widgets in that spot, including stuff that … Read more

wp_get_archives for a specific category?

I did this in a relatively complicated way using a custom query. I did not know about Smart Archives Reloaded so I wrote code myself. But it works. Replace your category ID for “term_taxonomy.term_id” <?php global $wpdb, $wp_locale; $query = “select YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts from $wpdb->posts, $wpdb->term_taxonomy, $wpdb->term_relationships WHERE … Read more

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