Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8179805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:04:48+00:00 2026-06-07T00:04:48+00:00

I am getting two types of errors that I don’t know how to fix.

  • 0

I am getting two types of errors that I don’t know how to fix.

You can see the errors here: http://www.brainbuzzmedia.com/themes/vertex/

The first type occurs twice and looks like this:

Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/admin/buzz/themes/vertex/wp-includes/functions.php on line 3587

I have a call in functions.php:

function my_init() {
if (!is_admin()) {
    wp_enqueue_script('jquery');
}
}
add_action('init', 'my_init');

The second error type is this:

Notice: Undefined property: stdClass::$slider_height in /vertex/wp-content/themes/vertex/slider_settings.php on line 32

No matter where (inside or outside of if statements or both) I define these variables they are still giving me this error.

* update

I have some other scripts enqueued in a subfolder of the theme’s files, mostly used for admin area.

$path = get_template_directory_uri() . ‘/includes/metabox/smart_meta_box/smart_meta_fields/layout-editor/’;

wp_enqueue_script(‘mcolorpicker’, $path . ‘js/mColorPicker.js’, array(‘jquery’));

wp_enqueue_style(‘chosen’, $path . ‘css/chosen.css’);

wp_enqueue_style(‘content-layout’, $path . ‘css/content-layout.css’);

wp_enqueue_script(‘jquery-json’, $path . ‘js/jquery.json.js’, array(‘jquery’));

wp_enqueue_script(‘chosen-jquery’, $path . ‘js/chosen.jquery.min.js’, array(‘jquery’));

wp_enqueue_script(‘content-layout-js’, $path . ‘js/content-layout.js’, array(‘jquery’, ‘jquery-ui-sortable’));

I think they may also be needed for front end display as well. How would I enqueue these the right way?

  • update 2

Here is the code where two of the undefined property errors occur:

link to txt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:04:49+00:00Added an answer on June 7, 2026 at 12:04 am

    Use the wp_enqueue_scripts action to call this function, or
    admin_enqueue_scripts to call it on the admin side.

    To load it for front end, use

    add_action('wp_enqueue_scripts', 'my_scripts_method');
    function my_scripts_method() {
        wp_enqueue_script('jquery');
    }
    

    To load it for admin, use

    add_action('admin_enqueue_scripts', 'my_admin_scripts_method');
    function my_admin_scripts_method() {
        wp_enqueue_script('jquery');
    }
    

    Reference: Codex.

    The second error occured because jQuery is not loaded.

    Update:

    If you hae any wp_register_script(xxx)orwp_enqueue_style(xxx)call in yourfunctions.php or in your any plugin file directly then use them inside wp_enqueue_script handler as follows

    add_action('wp_enqueue_scripts', 'my_scripts_method');
    function my_scripts_method() {
        wp_register_script('xxx'); // replace the xxx with valid script name
        wp_enqueue_script('jquery');
        wp_enqueue_style(xxx) // if you have any
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting two errors in main that have me stumped: no matching function for
I'm getting two errors, both revolving around encoding and both related. The first error
MessageBox.Show((some_string.Length).ToString); I am getting two errors for this: The best overloaded method match for
I'm getting the following two errors when loading my page: Notice: Undefined variable: realtor
Now I'm getting another error. error C2065: 'temp' : undeclared identifier I know that
I am getting an error that I don't quite understand with the following script.
If I define an explicit conversion operator between two types, shouldn't it follow that
I'm trying to do something that should be real simple but I'm getting errors
I'm trying to concatenate two fields in LINQ so that I can then filter
I need help getting two pieces of data, and comparing them. What I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.