I figured this out. For anyone facing the same issue, I ended up using this code instead:
function hi_customization_options( $wp_customize ) {
$wp_customize->add_section(
'landing_page_image',
array(
'title' => 'Landing Page Image',
'priority' => 35,
)
);
$wp_customize->add_setting(
'lp-image_selector',
array(
'default' => '',
)
);
$wp_customize->add_setting( 'img-upload' );
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'lp-image_selector',
array(
'label' => 'Landing Page Image',
'section' => 'landing_page_image',
'settings' => 'img-upload'
)
)
);
}
add_action( 'customize_register', 'hi_customization_options' );
Related Posts:
- When to use is_home() vs is_front_page()?
- Using classes instead of global functions in functions.php
- Get url of thumbnail from the media uploader
- Import media to online WordPress from local development
- What are the ADVANTAGES of ORIGINAL wordpress template structure?
- Change admin bar to default:off
- How to change admin bar color scheme in MP6 / WP 3.8 front end?
- Template for individual post designs
- How to force Media manager to overwrite files of same name?
- When to use esc_url, esc_html, esc_attr, and friends?
- Best practices – Should I create a child theme vs. customizing a framework theme? (such as HTML5 reset)
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- How to disable 3.1 “Admin Bar” via script for the admin user?
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- Front End Post Submit Form
- How can I stop WP media uploader from creating duplicates of my uploaded images?
- Plugging into the Media Library to upload images (NOT associated with any post)
- Feature Survey – What would you want in a resume theme?
- How the WordPress sidebar works
- Should we localize custom-made themes / plugins?
- Change loop order via form or link (jquery, not URL)
- Extend walker – navigation, adding data attribute to a tag
- How can I remove the Static Front Page option from the Customizer
- Set front page as static page [closed]
- How to programmatically bring back “excerpts” field in post editor in WP 3.1+
- How can i customize the comment list
- How to add custom template tag in wordpress theme?
- How should I store global information such as a phone number so that it is editable through the CMS?
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- How to handle theme customization and sass variables
- wp_enqueue_scripts not called on search page?
- wp_head() not inserting the default stylesheet style.css
- Upgrading a custom theme through the Dashboard
- Get attachments by user
- First completely customized theme, where should I start?
- WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way
- Theme Customizer not loading
- wp.media issue with selected image
- How to clean up the theme for production?
- Templates without a loop, best practice?
- searchform.php doesn’t work properly
- CSS added through customizer neglects the need of a child theme?
- Customizer: get_preview_url() inside customize_save_after hook
- How to add custom meta box when you have a custom page template file
- add shortcode support in customizer
- Clearing dummy data before launch
- How to call a widget in a loop at a specific iteration value?
- Right procedure when you develop a WP Website for a client
- Woocommerce Product attribute not imported with wordpress Importer [closed]
- New to WordPress – Read the Codex, Other Docs; Still Confused
- Create theme for mobile phones and tablets only?
- How to add custom page elements to the WYSIWYG editor?
- Alternatives to handle customizer settings
- Update Specific Key Value in Complex `wp_options` object
- Can’t change theme name
- Remove/Hide a Widget on a Custom Template
- My contact form – I’ve changed the source code but the changes are not being applied
- How to custom category template based on category?
- How to use multiple check-box values to work in a function and insert values in database
- “The REST API did not process the context query parameter correctly.” Custom theme conflicting with Media Library
- What is difference between add_theme_support and Theme Customization API?
- Is hand coding required at all?
- Text View (Code View) in WordPress Customizer TinyMCE Editor
- how to edit woocommerce checkout page
- How to make the media library searchable by image title
- WordPress uploads do not show up and I see the white screen of death in some cases
- What is the best practice workflow for new website overhaul and keeping current SEO ranking? [closed]
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- WordPress menu walker – Get parent item text inside end_lvl function
- How to dowload and edit content of a website
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- Add a customize control depending wich radio setting is checked
- Any way to permanently translate themes?
- WordPress Customizer Help with FontAwesome Icon
- Undefined index: custom_sidebars
- How to share posts (and plugins) between existing site and new, separate dev/test installation?
- How to prevent XSS attack in wordpress theme?
- Best strategy for providing theme options using customizer
- Customizer API way function is_customize_preview() works only in main page?
- page.php is not called when I load a Page
- Support Multiple featured images
- WordPress 3.5 + Foundation 5 not working on IE9
- How Does One Create a Global Variable Repository
- What hook to use for loading a custom class extension during Theme initialization?
- trying to figure out how to use more that one image upload in the same section in theme customizer
- Theme Option’s Save Button is not working
- How to convert that page to a wordpress template? [closed]
- Not Found when using activity stream as front page with BuddyPress
- How do I change the tagline input to textarea?
- WordPress theme Modifications not showing up on live server
- Turning WordPress Into full-featured website?
- Best practice to create required pages
- Permalinks problem with custom theme
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- How can i move my product name & price from below thumbnail to be the rollover content in Avada & Woocommerce?
- How to split the site’s layout without damaging this layout? [closed]
- Multiple content areas with Gutenberg – Transparent areas mid content
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- Is there any halfway decent documentation on the wp.media JS class?
- Convert base64 string to WordPress attachment uploads multiple images instead of a single one