WordPress Theme Customizer dropdown page option issue
-
I am trying to develop a place to put a Call-to-Action in the theme customizer admin panel with an option to select a drop down of site page. I get the pages to show up in the drop down but when I try to call it into the frontpage php file, the main blog url shows instead of the page link on the call-to-action button. Here is my code:
in customizer.php:
// Page Drop Downs $wp_customize->add_setting('bigblog_theme_option[page-url]', array( 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'bigblog_cta_url', array( 'label' => __( 'Front Page Call-to-Action URL', 'bigblog' ), 'section' => 'frontpage-custom', 'type' => 'dropdown-pages', 'settings' => 'bigblog_theme_option[page-url]', ) ) );
In the front-page template:
<a>">
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
Does anyone know why it is not displaying the selected page in the dropdown? I have tried both get_theme_mod and get_option
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WordPress Theme Customizer dropdown page option issue’ is closed to new replies.