• Resolved microsoldering

    (@microsoldering)


    Hey there, i have customized search results with a custom plugin, as described in the steps here: https://wpstorelocator.co/documentation/customisations/

    I’ve been pulling my hair out over this.

    I intend to use a third party plugin (WP-RostRatings) to display a star rating in the search results. Basically i need to use a shortcode [ratings id=”POSTID”].

    It would appear that <%= id %> is expanded after the PHP is executed, so using that as a variable in a shortcode doesn’t work (and i didn’t really expect it to).

    get_the_ID() returns the post ID for the page wpsl is embedded on, rather than the post ID for a given store.

    How can i get the post ID for a store in PHP, to be used as a variable in shortcode execution?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Star Rating Shortcode. How does one get the post ID in PHP?’ is closed to new replies.