Custom post types problem
I’d recommend pTypeConverter instead of Post Type Switcher. I’ve run into a couple of odd issues when using it. http://wordpress.org/extend/plugins/ptypeconverter/
I’d recommend pTypeConverter instead of Post Type Switcher. I’ve run into a couple of odd issues when using it. http://wordpress.org/extend/plugins/ptypeconverter/
If your settings are stored as Theme Mods, rather than as a Settings API option, then you need to pass the appropriate value to the type parameter to $wp_customize->add_setting(): ‘option’: Settings API option (get_option()) ‘theme_mod’: Theme Mods API option (get_theme_mod()) Try changing this: $wp_customize->add_setting( $this_theme . ‘_theme_options[‘. $setting .’]’, array( ‘default’ => $param[‘default’], ‘sanitize_callback’ => … Read more
If you’ve done everything correctly during the setup, then you should be able to load the logo_image option like this: $my_theme_prefix_option = of_get_option(‘logo_image’);
Yes, that will get rejected. It’s also wholly unnecessary, since you can use relative paths to the images in your CSS file, you don’t need to have them dynamically generated.
This… array(’54’=>’Post #1′,’23’=>’Post #2′, ‘654’=>’Post #3′,) … is not a string. It is an array definition. All you need to do is create an array, which is what you want, and skip the string completely. function post_page_options(){ $post_page_options = get_posts(‘category=orderby=title&order=asc&numberposts=”); foreach( $post_page_options as $value ) : $str[$value->ID] = $value->post_title; endforeach; return $str; }
By default, options are auto-loaded. So all options with autoload: yes will be fetched very early. Your option will not need an additional query. Also, database access is often faster and more reliable than file access. The options table is also usually included in database backups, and it can be exported in multiple formats. So … Read more
Couple points: The customize_register action hook actually passes your function the $wp_customize variable, you don’t need to declare it as the global. Just put it as the first argument in your function declaration. The reason your code doesn’t run on the front end of the site is that the customize_register action hook only runs when … Read more
The Misconception get_site_url() retrieves the site_url option from the database, as set under General Settings in the administrative backend / wp-admin. If this is indeed the exact same wordpress installation it will always return the same thing, regardless of whether the location is reachable via one, two or five hundred domains. You might want to … Read more
… using this code in index.php the result is “null” Since the code referenced is var_dump($input_examples); that means that $input_examples hasn’t been set or it out of scope where you are trying to use it. You will need to add … $input_examples = get_option(‘price_display_options’); // maybe not the right key … to your code before … Read more
The get_template_part() function is intended to include a template-part file in the template – i.e. on the front end. Use include() instead, along with get_template_directory(): function theme_options() { include( get_template_directory() . ‘/content-options.php’ ); }