Services Plugin Shortcode position on page

ForumCategory: PluginsServices Plugin Shortcode position on page
cwjordan asked 3 months ago

I noticed when using the Services Plugin’s [upcoming-services] shortcode that it will put the list of upcoming services before any content on the page.  That is, if I have:

<p>This should be the first line</p>

Then the list of upcoming services is displayed above the line that says “This should be the first line” instead of below it.  That doesn’t seem to be desirable behavior, perhaps it could be fixed in a future plugin update?
Looking at upcoming-services-shortcode.php this may be a problem there.  The function uuaservices_shortcode_upcoming_services is producing output instead of returning a value.  The WordPress Codex says that “Shortcode functions should return the text that is to be used to replace the shortcode” and that “Producing the output directly will lead to unexpected results”.

cwjordan replied 3 months ago

Oh, sadly, but not unexpectedly, there is the same problem with the [service-archive] shortcode