-
AuthorPosts
-
June 2, 2021 at 10:43 pm #9527MathematicaParticipant
Hi.
I would like to use the shortcode [wpsr_share_icons template=”1″] in a template or reusable code and share the content of the page where the template is inserted.I tried doing this with Templatera (https://codecanyon.net/item/templatera-template-manager-for-visual-composer/5195991) or the custom Post Type “Reusables” in the 907 theme http: // themes.webcreations907.com/ninezeroseven/, to be able to modify in one place the shortcode, the layout around the share icons, etc.
However, I still have the same problem: by clicking on a share icon, the shared content is that of the template and not that of the page where the template is inserted.
I think the problem is that the code stored in the shortcode get exceuted in the template and not in the page that uses the template.
Any idea will be welcome 🙂
I thank you in advance for your response.June 2, 2021 at 11:04 pm #9529Aakash ChakravarthyKeymasterHi @Mathematica
Thanks for using WP Socializer.
It seems strange. May be as you guessed, the shortcode is getting executed by the template.
I’m not sure how this “templatera” works nor I use WP bakery that is not a free plugin.
But I can assess the issue faster or provide workaround if you can have a live look at the website.Can you please create a temp admin user and share the the details via contact form ?
If you are new to this, you can also use plugins like https://wordpress.org/plugins/controlled-admin-access/ to restrict certain pages and let me use only the pages you need me to see.
Thanks,
AakashJune 2, 2021 at 11:38 pm #9531MathematicaParticipantThank you very much for your very quick response.
I sent you links by the contact form and some details.Laurent
June 3, 2021 at 12:46 am #9532Aakash ChakravarthyKeymasterHi @Mathematica,
I saw the links you have shared.
It seems there is no other way other than the templates “not executing” the shortcode.
This is common to all shortcodes or other sharing plugin which provides shortcodes.
Since the shortcode is executed in the context of the template, the URL is incorrect.Can you please check with yout theme developer if their “resuables” can stop executing the shortcode in the template ? but execute it only when used in a post ?
June 3, 2021 at 1:34 am #9533MathematicaParticipantThanks again for your answer.
I will ask the developer about the execution of the code contained in a template.
I have one last question however: can your “shortcoder” plugin help me ie help me create a place where I can globally modify a piece of code containing the shortcode [wpsr_share_icons template = ”1 ″] ?
Have a nice day.
MathematicaJune 4, 2021 at 2:25 am #9536Aakash ChakravarthyKeymasterHi Mathemetica,
I think a plugin called “shortcoder” is there just to solve issue like this, where users can create a shortcode for HTML/CSS/JS/Shortcode snippets.
It is one of my other plugin.
You can create a shortcode, with above sharing shortcode itself as a content and then use the “shortcoder” created shortcode to use in posts and pages.Thanks,
AakashJune 4, 2021 at 10:51 pm #9540MathematicaParticipantThanks a lot for your answer.
I tried your “shortcoder” plugin and it works fine. It does exactly what I wanted: I can edit the content of 100 pages in one place! Extraordinary !!
Thank you very much, your plugin is a very good idea!Mathematica
June 4, 2021 at 11:39 pm #9541Aakash ChakravarthyKeymasterCheers !
June 6, 2021 at 12:50 am #9547UmertaunParticipantThank you!
-
AuthorPosts
- You must be logged in to reply to this topic.