This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Register new admin scripts

7 years ago · Last reply by Alex S 7 years ago

Hi! I am try to add some js and css scripts to a custom field, but I am lost, any idea?
Regars!

function initialize() {
add_action( 'siteorigin_widgets_before_widget_select-news', array( $this->id_base, 'enqueue_widget_scripts' ),10,2 );}

function enqueue_widget_scripts($instance, $widget){
    wp_enqueue_style('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css', [], null);
    wp_enqueue_script('select21', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js', [], null, true);}

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Alex S Staff 7 years, 7 months ago

    Hi Bianqui,

    I’d like to help you with this issue, but unfortunately, this is beyond the scope of the support we’re able to offer on our free forums. There is a fair amount of custom work involved. You could hire a developer to implement this for you.

    We recommend using Codeable. You’ll be able to hire someone at an hourly rate to do this work for you.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread