Memoria Ticket System
Include style only on pages where form is available (2 posts)

  1. Olaf Lederer
    Posted 1 year ago #


    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.


  2. vatanbytyqi
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Memoria Ticket System
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic