Support » Plugin: Memoria Ticket System » 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)
  • Plugin Author vatanbytyqi


    Sorry for the late reply.

    Thank you for your code sample. True, it is unnecessary to include the style on other pages even though it doesn’t affect the other pages.

    I will make it ready for translation as well. Wanted to see what people thought about the core functions first therefore launching as early as possible.

Viewing 1 replies (of 1 total)
  • The topic ‘Include style only on pages where form is available’ is closed to new replies.