WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] News-Ticker plugin cycle.js not loading (2 posts)

  1. lee718
    Member
    Posted 1 year ago #

    Hi,

    I need some help getting news-ticker to work. The only way I have been able to get this to (sort of) work is by copying cycle.js to my theme's js folder. But that's not good and I think it's not loading the other php files either.

    I have tried to enqueue the files in functions.php but it didn't work, and I don't know if I should have to. I have been using other plugins fine with foundation framework.

    function foundation_assets() {
    if (!is_admin()) {
    
    //Attempting to load news-ticker js file
    wp_enqueue_script( 'cycle', get_template_directory_uri().'../../news-ticker/cycle.js', array('foundation'), '1.0', true );
    
    // Loading my other stuff here
    	}
    }
    add_action( 'wp_enqueue_scripts', 'foundation_assets' );

    Appreciate any help.

  2. lee718
    Member
    Posted 1 year ago #

    I just realized my mistake. Should be.... ( 'cycle', plugins_url('news-ticker') etc.

Topic Closed

This topic has been closed to new replies.

About this Topic