• Hi there,
    I’m developing a plugin that renders a contact form on a page that is equal to ‘register’. The plugin, when activated generates that page too and shows the form. But for some reason the form.css gives this error in the console `Failed to load resource: the server responded with a status of 403 (Forbidden)
    `

    I’ve already tried looking up the problem, and tried to update my permalinks. But that didn’t work. Does anyone have any other solutions that might work?

    P.S. it’s hosted on my localhost

    • This topic was modified 4 years, 8 months ago by Jan Dembowski.
Viewing 1 replies (of 1 total)
  • Thread Starter janmoes

    (@janmoes)

    I somehow fixed the issue. At first I loaded in the css using this line of code:
    wp_enqueue_style('form_css', dirname(__FILE__) . '/css/form.css', array());

    I’ve only changed the method dirname() with plugin_dir_url() which made it load the .css file correctly!

Viewing 1 replies (of 1 total)

The topic ‘403 on inserting style’ is closed to new replies.