I'm wondering if someone can help me with this. The theme I am working on has a custom theme options page where you can select various colors for the website. The problem is that the stylesheet it produces loads before the bootstrap and main stylesheet in header.php. I need this to load after those two. Is this possible to do?


Found a solution. I just added a number at the end like this..

add_action( 'wp_enqueue_scripts', 'moana_enqueue_color_scheme', 789 );

  • 2
    That'll work too, as that number is actually the priority in which the callbacks are rendered in an action hook. But, you'll need to create separate callbacks for each of your stylesheets and use priorities accordingly. The best way is using the stylesheet dependencies, which gives you much more control over the enqueued scripts and stylesheets. – Abhik Oct 23 '15 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.