Issue with using [display-posts] shortcode on Wordpress - wordpress

I am having an issue finding any way to display a single post on the woocommerce checkout specifically on a payment plugin, I use other shortcodes in these gateways and they work perfectly.
However when I try using some display post shortcodes it doesn’t work at all and instead shows up as text.
Example of my issue - i edit and put in the shortcode [display-posts] and instead of displaying the posts it simply displays [display-posts].
I have tried using multiple shortcode plugins and even tried creating my own. The main one I have tried to use is [display-posts] with the plug-in. I always put it in my themes functions.php as well!
I have tried these short codes on the regular Wordpress pages that I have that are published and have found I have the same issue, so I don’t believe it’s the placement I want the shortcode to appear at. Can anyone help me with this?

To make all the posts display you can create a custom shortcode and the shortcode which you are using is [display-posts] is not default WordPress in build shortcode. To have your same shortcode run please install the below plugin: https://wordpress.org/plugins/display-posts-shortcode/
Then you [display-posts] shortcode will work or another solution is custom shortcode as I mentioned above.
Please let me know if find any issues.
Thanks.

Related

Where does Elementor plugin keeps template pages?

I need to find a specific line of code on my website foodhide.pl (password is "11111" if someone would like to see it) page that is build with elementor plugin. Hovewer I can't find where does Elementor keeps these templates.
I've tried searching for a post id which is "2909" but nothing seems to pop up.
Appreciate any help on this topic!
Got an answer directly from Elementor support.
Elementor uses JSON format for the templates, The only option to paste an Elementor template to a page not built from Elementor is to
use shortcodes. You can copy the shortcode of the template and paste
it to the page made with Wordpress.
If you do wish to get the code of the template made with Elementor,
unfortunately, there is no option to achieve it directly.

Shortcode in custom theme not showing no matter what

I made a simple WordPress theme which I'm testing locally. I got a Instagram feed plugin which gives me a shortcode to add anywhere on my blog/theme. The problem is, the shortcode does not display the feed or anything for that matter but I can see the feed's code (div) when I check the page source code. Other shortcode works but not this one. The Instagram feed works on other themes but not mine. I've tried almost all the online solutions (add_filter, do_shortcode etc) but none works.
I'm sure the problem is not in the shortcode or plugin because it works on other themes and maybe there is some problem with my theme. I had also made a WordPress theme before and the feed doesn't work even in that. I don't what code to show because I really don't the where the problem is in my theme. Any help will be appreciated.
Edit:
The shortcode is [instashow id="2"]
I've tried adding that to a page but that doesn't work. I've also tried adding <?php echo do_shortcode('[instashow id="2"]'); ?> in the template itself but that doesn't work either.
You checked to see if the plugin settings are correct?
The next step would be to check other shortcodes in other plugins to see if other shortcodes work or have problems too.
First you have to make sure if the problem is caused by the theme or the plugin.

How do I call a plugin in a custom page for wordpress?

So I am trying to do this and I don't know how. I have a wordpress powered website with a plugin called "frontier-post" in it. This plugin makes a new front-end post submission. The way to use it is to put the shortcode "[frontier-post]" in any post in my wordpress page and that page turns into this.
I want to make a custom page for myself, where I can have the content created by this plugin there too. So I do not want it to be a post in my wordpress, but lets say at a corner in the custom page. I have searched and found these but the suggestions there would not work. I am able to include the wordpress so that the custom page has access to posts, etc. but even using this
echo do_shortcode('[frontier-post]');
would not help me. (even if header is included)
These are the similar things i found:
Wordpress/PHP - How to use plugins outside wordpress-powered pages?
Need Help for my Custom Page Template
I would really appreciate it if you could help me with this.
If you are creating a PHP page that isn't going to be rendered inside WordPress, you can't use a Plugin of the WordPress engine to accomplish what you are wanting to build. (As the accepted answer to one of the pages you link to indicates).
Instead, you might be able to use the json-api plugin and have your custom page query it for the data. While it won't render the shortcode, it will give you the raw data to work with.
http://wordpress.org/plugins/json-api/
Edit:
Based on a comment, your do_shortcode should work...just try it without the square brackets.

displaying pages containing wordpress shortcode

I wrote a shortcode for wordpress to display wordpress posts and pages. Displaying posts is fine but when I try to display pages, it goes on infinitely. I guess one of the pages contains the shortcode and hence it displays recursively. Can anyone suggest me the solution for this. As to how I can prevent short code from being executed while displaying ?
not totally sure if I understand correctly. Maybe you just need to have the shortcode run not from a page but in a template php file.
http://codex.wordpress.org/Function_Reference/do_shortcode
otherwise you will need to exclude that page from being displayed in your shortcode manually, is it a plugin you are working with?

wordpress prevent multiple shortcodes

I created a wordpress plugin and I added shortcode feature to it.
but i want to execute only one shortcode and prevent applying of multiple shortcodes if the administrator did so.
thanks.
You may find what you need here:
https://wordpress.stackexchange.com/questions/40733/check-for-shortcode-in-post-pages-and-widgets-and-template-files
However please note that if you allow only one shortcode to run, if your client installs a plugin that used shortcodes this will not work.
Why you need this anyway? Maybe we can find a better solution :)

Resources