WordPress.org

Ready to get started?Download WordPress

Forums

T&P Gallery Slider
Shortcode disappear (2 posts)

  1. magda_u
    Member
    Posted 1 year ago #

    Hi, a new problem here - when I create a new post and put a shortcode [tp_gallery] and save the post, the postcode is being cut from the code and of course no slider is being created. Strange even more that it still works on older posts.

    Any hints please?

    Is there a way to put the short code for good for each post by modifying content-single.php? if yes, what would be the syntax?

    Thank you

    http://wordpress.org/plugins/tp-gallery-slider/

  2. pey22
    Member
    Plugin Author

    Posted 1 year ago #

    Hello magda_u you can use the short code in your single.php by passing the post id like this:

    <?php echo do_shortcode('[tp_gallery post_id="id"]'); ?>

    replace id with the current post id.

    if the [tp_gallery] does not work in the post content, make sure that you put it in the HTML editor and not in the visual.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.