Support » Plugin: WordPress Shortcodes Plugin — Shortcodes Ultimate » Posts: invalid template name after update

  • Resolved krzxsiek

    (@krzxsiek)


    I have the problem after update.
    This is my shortcode [su_posts template=”../../default-loop.php” posts_per_page=”10″ taxonomy=”post_tag” tax_term=”193″ tax_operator=”0″ order=”desc”]
    Template file is inside /wp-content/
    If remove template attribute everything work but I want to have my own template file. Before update works fine.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Vova

    (@gn_themes)

    Hi @krzxsiek,

    unfortunately, the wp-content directory isn’t allowed anymore. Since 5.4.0 you can only use a template from within the plugin or active theme directories.

    This was made to improve security.

    There’s a workaround. But it requires some additional actions on your side. Please let me know if you’re interested.

    Thread Starter krzxsiek

    (@krzxsiek)

    I understand. I just want this file to be out the plugin directory because if I update the plugin, it will remove it. I would like to avoid it.
    Tell me about these active themes. Can I upload the file to my website theme in /wp-content/themes/?
    Sorry for my English 🙂

    • This reply was modified 3 years, 3 months ago by krzxsiek.
    Plugin Author Vova

    (@gn_themes)

    I’d recommend storing templates within a child theme.

    Thread Starter krzxsiek

    (@krzxsiek)

    I don’t need child themes. I have my theme and I would like to have this file there.

    Plugin Author Vova

    (@gn_themes)

    SU will find template within your theme.

    Thread Starter krzxsiek

    (@krzxsiek)

    It works 🙂 I placed my file in /wp-content/themes/myTheme/my-default-loop.php
    [su_posts template=”my-default-loop.php” posts_per_page=”10″ taxonomy=”post_tag” tax_term=”193″ tax_operator=”0″ order=”desc”]

    Thanks for help 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Posts: invalid template name after update’ is closed to new replies.