Include style only on pages where form is available
-
Hi,
Nice plugin!
I see you found some workaround for the image paths in default_style.css ??
It would be great to have all these styles only on those pages where the shortcode (or the form is used). I use this check in my own contact form plugin:
if( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'sts_memoria_ticket_system') ) {
If you don’t like to have the CSS code in your html, just include the css file with a php extension (quick and dirty) or use JavaScript to change the style for the images (together with wp_localize_script).
Since you’re from Sweden, I’m a bit surprised that your plugin is not ready for translations.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Include style only on pages where form is available’ is closed to new replies.