Skip to content

How to use custom css files with pages shown through the new routes ? #20

@maxcode360

Description

@maxcode360

Hi,
This may be a very simple thing to do but can't figure it out.

Q- How does one go about including css files on the page accessible through a route setup via WP-Router ?
Note: The page is being set up via a new plugin I am trying to make.
Note2: linking to a CDN is an option but figuring out what to do if I want my plugin to be self-contained

Do we -
A) Use the action 'wp_enqueue_scripts' or
B) Serve the file from another route(like '/assets/css/mycss') setup using WP-Router using 'file_get_contents' ?
C) Something else.

Let me know if this can be done with this plugin? Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions