Im building my own wordperss theme and when starting on the WordPress Customizer for theme options I have come in a little bit of trouble.
Basically im trying to create a textarea and what I have read I need to create a extended class and then call it under the add_control function of WordPress.
I have tried this and all works well in customizer mode but as soon as I enter any other part of the site I get this error:
Fatal error: Class 'WP_Customize_Control' not found
As I say it works 100% within the customizer it's self but any other page including admin I get this message.
Here is the class:
class ublxlportfolio_textarea extends WP_Customize_Control {
public $type = 'textarea';
public function render_content() {
?>
<label>
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
<textarea rows="5" style="width:100%;" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
</label>
<?php
}
}
Do I need to wrap it in a conditional tag? If so what would that be??
Am I doing this all wrong?
facepalm
once I figured out my stupidity. – Mommy