WordPress.org

Forums

Display Shortcode Inside Plugin (1 post)

  1. telkins
    Member
    Posted 1 year ago #

    I am trying to use a plugin that uses a shortcode to display custom posts inside of store locator plugin.

    Essentially, when the client would load a location and place a shortcode like [display-posts post_type="promo" posts_per_page="1" include_excerpt="true" author="telkins"].

    However, anytime I add this to the description, I see [display-posts post_type="promo" posts_per_page="1" include_excerpt="true" author="telkins"] instead of the shortcode. Is there a way to make a shortcode work inside a plugin?

    I also tried <?php echo do_shortcode('[display-posts post_type="promo" posts_per_page="1" include_excerpt="true" author="telkins"]'); ?> in the description and it does the same thing. Thanks to anyone who can help!

Topic Closed

This topic has been closed to new replies.

About this Topic