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?
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.
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 7 years, 7 months ago by
Tijmen Smit.
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.