Hi there, I have a custom post type of ‘Lesson’, where I would like to add in the uikit css and js files (Uikit is a front end framework similar to bootstrap – https://getuikit.com/docs/installation) from their cdn, into the header for this post type, in order to allow me to code elements from the Uikit framework into my posts.

I have tried looking through your documentation, but I cannot understand how to achieve this? So for example, I just want to be able to add these 3 lines of code, to my header:

<!-- UIkit CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/uikit.min.css" />

<!-- UIkit JS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/uikit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/uikit-icons.min.js"></script>

…but ONLY for ‘Lesson’ custom post type (as this library is already being loaded on other post types, so I don’t want it to be global or I will get conflicts)

Thanks in advance for your help,





2 responses to “How do I add a css / js framework cdn link to my header for specific post types”

  1. cmsexpertss says:

    Hi Keith,

    Thank you for contacting us.

    You can easily do it by following these steps:

    – Go to Scripts Organizer -> Features
    – Check “Enable Scripts Manager” and save settings
    – Now reload the page and Go to Scripts Organizer -> Scripts Manager
    – Add your CDN URLs there and select appropriate CSS/JS options as per files
    – Now create a Code Block and set it to run only on “Lesson” post type
    – In Code Block settings select Scripts Manager to “Show” then under “Enqueue Scripts” select the scripts you registered in Scripts Manger and save your settings.

    Muhammad Osama

  2. devusrmk says:


    Here you can see how to use Scripts Manager

Leave a Reply

Your email address will not be published.