• Hello, I am making a website for one of our clients and am using your plugin to show the stores wich are connected to this client.

    On a pagw without sub-pages the plugin works fine but on subpages of this page (wich shows stores bases upon specific categories).

    Do you know why this happens? It seems the ‘standard’ stylesheet of the plugin is not loaded onto a sub-page.

    Due to privacy I can not just put the URL publicly into this post.

    https://ibb.co/k8AudU

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    You mean sub page of the store locator pages, or normal pages?

    If you use a default WP theme, and disable all other plugins does it then also happen?

    Thread Starter Ruurd de Wind

    (@geoclaps)

    Hello Tijmen, thank you for the response.

    I mean a sub page of a page. I have made my own theme, using 3 other plugins: Contact Form 7, Advanced custom fields and Yoast SEO. The rest is made custom/by hand.

    I include the store locator by shortcode with the shortcode you created. On the sub page I use a category specific shortcode.

    Shortcode on the main page:

    do_shortcode('[wpsl template="template_name"]');

    Shortcode on the sub-page (of main page):

    do_shortcode('[wpsl template="template_name" category="category-name"]

    The standard theme has been created with the help of your documentation wich is a ‘child’ of the theme you included. It’s a one on one copy.

    Deactivating plugins isn’t solving the issue. Strange thing is that the stylesheet is loaded on the main page but not on the sub page wich loads exactly the same scripts/stylesheets.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Maybe try to load the CSS file again through the functions.php inside your active theme folder with this code?

    wp_enqueue_style( 'wpsl-styles', WPSL_URL . 'css/styles.min.css', '', WPSL_VERSION_NUM );

    • This reply was modified 6 years, 2 months ago by Tijmen Smit.
    Thread Starter Ruurd de Wind

    (@geoclaps)

    Hello Tijmen,

    Thank you for this solution. This works.
    I used the following rule:

    wp_enqueue_style('wpsl', plugin_dir_url() . 'wp-store-locator/css/styles.min.css', '2.2.16');

    Final question: wich function can I check to see if the WPSL plugin is loaded onto a page/post? This way I don’t have to include the CSS on every page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin stylesheet missing on sub-pages’ is closed to new replies.