• I am developing a wordpress plugin that collects some data form an API and then presents them on a wordpress page.
    I have first developed the style for the plugin separately from WordPress (HTML and CSS only with hardcoded data) and I am satisfied with the look and behavior.
    However, when I migrated the code to WordPress the style is somehow messed up.

    This is how I have added the style:

    add_action('wp_enqueue_scripts', 'enqueue_my_style', 999);
    function enqueue_my_style(){
    	wp_register_style( 'my_style', plugins_url('/css/my-style.css', __FILE__), true, '1.0.0', 'all');
    	wp_enqueue_style( 'my_style' );
    }

    My question is why is the style messed up and what can I do to fix it?

    Unfortunately, I am not allowed to share the code publically, so at this point I am only asking for some directions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey,

    Could you provide more information, as to what exact elements seems to be “messed” up?

    Is it HTML or CSS related? Are there any missing elements, or maybe some of the CSS classes got overwritten with different colors/styles?

    Does your current WordPress envirounment have any other plugins/themes that could be interfering with your work, or is it a plain WP installation?

    Will wait for more information, and help you out ??

    Thread Starter djolec987

    (@djolec987)

    It’s a plain WP installation with the default theme. There are other plugins but they are all deactivated.

    There are no missing elements, it seems that only CSS is the problem (fonts and some margins)…

    Here is how it SHOULD look like: https://ibb.co/h86QWxz

    And, here is how it looks like: https://ibb.co/SymWsCF

    In the meantime I ensured that I add a “gdl-” prefix to all classes in order to avoid overwriting, but the result is the same.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wordpress plugin messed up style’ is closed to new replies.