WordPress.org

Ready to get started?Download WordPress

Forums

how to add scripts to plugin? (1 post)

  1. MatthewRuddy
    Member
    Posted 3 years ago #

    Hi. I am trying to add scripts and styles to my first wordpress plugin.

    Currently, I am using add_action('wp_head','easing_head') then using php include to include both the css and javascript files. However, this prints them on the page source, which I don't want.

    The the function easing_head has many variables in it [such as $source = get_option('source')] and using wp_enqueue_script or wp_enqueue_style means the scripts are loading but the variables no longer work which is needed for it to display correctly.

    These variables contain information set by the user, such as the height, width, colour, in the CSS. These are set by the user in the admin control panel.

    The page in question is http://www.matthewruddy.com/new. I simple wish to include the scripts and styles without actually printing them on the source, with the variables still continuing to function. Is this possible?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.