Shortcode in custom theme not showing no matter what - wordpress

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.

Related

Issue with using [display-posts] shortcode on 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.

Anyone using Magazinenews theme on Wordpress to say where to put the_content code for Elementor?

I just created new homepage with elementor plugin on Wordpress. But when I tried to edit, I get error message. I understood that I must to add to the theme. But I don't know where in my theme Magazinews. I tried in "page.php" and "index.php", but nothing happened.
The the_content() missing doesn't really mean your theme is missing the content. Also, since you were able to edit that page before ( when you created it ) your theme obviously has the_content() there.
In this case, try disabling other plugins and see if that helps. If it does enable them one by one and you should be able to find the culprit.
If you left any information behind make sure to add it.

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.

Wordpress theme from scratch shortcode error

I am transfering my static website into Wordpress. I have created necessary files (header.php, index.php, etc.) and separated content to these files.
Site is working perfectly now, but when I try to include any gallery plugin via shortcode, gallery is not displayed properly. I think some css or js file is not loaded, but browser console log is not showing any error.
Question is: do I need to modify my theme files to get shortcodes working?
My site: https://novy.woodtek.cz
Shortcode is supposed to be displayed in "Reference" section. It is there, but not visible.
Please help me. I will be glad for your ideas.
Thank you
Eduard
I have found the solution. Problem was that I had not 'wp_head();` in header.php and wp_footer(); in footer.php.
Now it is working.

WooCommerce pages showing as blank

The cart, my-account and checkout pages are all blank when I try view them. All I get is the header and footer. All I have done so far is download WooCommerce, go through the settings and add theme support. My shop page wasn't working until I added theme support but now thats the only page that does. Also I've noticed that if I use WooCommerce shortcode in my php files I can get the pages. But the shortcode doesn't seem to be working in the backend. BTW I'm using my own custom theme incase thats relevant.
What can I do to fix this?
update:
This must be an issue with my theme as if I set one of the default ones to active all the WooCommerce pages show. But I don't know what my themes issue is yet.
update: I have noticed that the WooCommerce pages are allowing me to add templates to them, apart from the shop page which is working. Why is this happening?
There are few steps to do.
First turn on debug, by switching WP_DEBUG to true.
View source of page, and check if everything is being rendered, and also check console for JS error.
At last, for theme, if after switching to default theme, content shows up, there is a theme related issue.
Check for missing templates or template parts or structure within related with page from which content is missing and compare it with default themes templates and template parts.
See if there is some template part missing, or modified, like content.php or content-page.php, the_content() , etc.

Resources