WordPress slugs and 404 handling takes preference over folders in site root?

For beta testing use either a separate domain or at least a subdomain in another directory than your live site. If you absolutely have to use the current setup install a plugin that offers password protection like Members or change the .htaccess rules to: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # … Read more

Classes and functions involved in serialization and unserialization

WordPress uses maybe_serialize() and maybe_unserialize(). Both of them use PHP’s native serialize() and unserialize() functions. See: http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l1028 http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l222 Both of those functions make use of the function is_serialized(), which checks if the variable is serialized yet. See: http://phpxref.ftwr.co.uk/wordpress/wp-includes/functions.php.source.html#l222

Admin Theme customization

You are missing the hyphen in your admin_print_styles hook. function kd_plugin_admin_menu() { /* Register our plugin page */ $page = add_submenu_page( ‘edit.php’, __( ‘KD Plugin’, ‘kdPlugin’ ), __( ‘KD Plugin’, ‘kdPlugin’ ), ‘administrator’, __FILE__, ‘kd_plugin_manage_menu’ ); /* Using registered $page handle to hook stylesheet loading */ add_action( ‘admin_print_styles-‘ . $page, ‘kd_plugin_admin_styles’ ); }

New custom theme option (text input) giving index error

Wrap the call in an isset() conditional in this line: <input id=”cpt_theme_options[cpt_sm_dribbble_handle]” class=”regular-text” type=”text” name=”cpt_theme_options[cpt_sm_dribbble_handle]” value=”<?php esc_attr_e($options[‘cpt_sm_dribbble_handle’]); ?>” /> Try something like this: $cpt_sm_dribbble_handle = ( isset( $options[‘cpt_sm_dribbble_handle’]) ? $options[‘cpt_sm_dribbble_handle’]) : ” ); <input id=”cpt_theme_options[cpt_sm_dribbble_handle]” class=”regular-text” type=”text” name=”cpt_theme_options[cpt_sm_dribbble_handle]” value=”<?php esc_attr_e($cpt_sm_dribbble_handle); ?>” /> EDIT Note: your other alternative is to set default options on init, so … Read more

Can’t save checkbox option

Not sure where you’re adding this functionality, but I don’t see anywhere in this code where you use the update_option() function. Above your form HTML you should check if the form has posted data, then update the option. //Do nonce checking here and $tweak = $_POST[‘tweakfunction1’] ? $_POST[‘tweakfunction1’] : ”; update_option(‘tweakfunction1’, esc_html($tweak)); WordPress includes a … Read more

How to get the true permalink of the static home page?

Edit: Wow. I mistyped a bunch the first time around. Hopefully nobody read that. All corrected now. /edit I went code spelunking… 🙂 Short version, the workaround would be this: <?php $front_page_id = get_option( ‘page_on_front’ ); $my_permalink = _get_page_link( $front_page_id ); ?> If you look into link-template.php in the WordPress core, you can kind of … Read more

wp_usermeta wp_usersettings

When a user changes their admin settings; like the screen options, posts per page or moves metaboxes around or ‘hides’ them, it is saved in their user settings. So if user settings are blank – the user has never tailored their admin environment. Aside: (I use this to great advantage in one of my plugins … Read more

Showing option when page is frontpage

Try if ( ‘page’ == get_option( ‘show_on_front’ ) ) {}. Edit but I’ve tried adding and replacing <?php endwhile; endif; elseif (is_home()): ?> with both of your code. Could you perhaps include your snippet with mine? I’m not sure why you would do that. I was specifically answering this question: But what if a page … Read more

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