Now, with a shortcode for the single most powerful PHP function there is (preg_replace), I dare to imagine that there is nothing that this simple plugin cannot do.
If you know what this amazing function, preg_replace, is capable of then put it to the test.
Here is an example of the syntax for the new new shortcode that calls preg_replace:
[preg_replace replace=”/to be searched/” with=”I replaced”]<li>The content to be searched</li>[/preg_replace]
and this is what you get:The content I replaced
I created this plugin that uses a shortcode to call wp_remote_get with parameters you pass to parsed and display a bit of HTML from a page on another site. You can include this shortcode in your page or post.
Here is an example of the shortcode that will display the Download Stats page for this Plugin on WordPress.org:
[remote_get url="https://wordpress.org/plugins/shortcurl/stats/" start='<div class="block-content"' stop='!-- block-content--' length="-1"].
and this is what you get:
Downloads Per Day
Now you can place your choice Comments on any Page or Post using a Shortcode.
This would display 1 random Comments with the Karma Value of 0 under the heading Random Testimonial
This would display your 8 most recent Comments with the Karma Value of 100 under the heading Client Testimonials
Please Let me know if have any questions, comments, or suggestions.