Add tags to pages

You can use the register_taxonomy_for_object_type function. The following adds the default ‘tag’ and ‘category’ taxonomies to pages: register_taxonomy_for_object_type(‘post_tag’, ‘page’); register_taxonomy_for_object_type(‘category’, ‘page’);

WordPress Settings API not saving options

Well , actually the error is pretty minor , on your callbacks you have wrote function logo_field_callback(){ $option = get_option(‘thanathos_social_logo_options’); echo ‘<input type=”text” id=”logo” name=”thanathos_social_logo_options[logo_field]” value=”‘ . $options[‘logo_field’] . ‘” />’; } function facebook_field_callback(){ $option = get_option(‘thanathos_social_logo_options’); echo ‘<input type=”text” id=”facebook” name=”thanathos_social_logo_options[facebook_field]” value=”‘ . $options[‘facebook_field’] . ‘” />’; } as you can see, you load … Read more

How do I use a color from theme options?

You would simply call that option inside of a callback, and hook it into wp_print_styles or wp_head (either one is semantically correct in this case). First, set up your callback, which will print an inline style sheet: function wpse74013_print_custom_styles() { ?> <style type=”text/css”> </style> <?php } add_action( ‘wp_head’, ‘wpse74013_print_custom_styles’ ); The next step is to … Read more

different way to achive stylesheet_url

bloginfo(‘stylesheet_url’) will always return the current theme’s stylesheet. If current theme is a child theme, for example, it will return style.css relative to the child theme’s root rather than the parent theme’s root. bloginfo(‘template_url’) will always return the parent theme’s template directory URL. So using <?php bloginfo(‘template_url’); ?>/style.css will always be the parent theme’s stylesheet. … Read more