Reflexa
Forum Replies Created
-
Forum: Plugins
In reply to: [WP BrowserUpdate] Split IE and EdgeThis Javascript is a great solution for the Internet-Explorer-Problem.
I’ve used the great plugin “Code Snippets”.In this plugin you have to enter the code between the <script> </script>-Area.
var $buoop = { required:{ e:-3, i:15, f:-3, o:-3, s:-1, c:-3}, insecure:true, unsupported:true, api:2020.02, reminder:0, reminderClosed:1, text_for_i: { 'msg':'<h3>Internet Explorer wird von dieser Seite nicht mehr unterstüzt.</h3>Viele Webseiten funktionieren im Internet-Explorer nicht mehr richtig. Es kann zu Anzeigeproblemen kommen.<br>Selbst Microsoft warnt vor der Benutzung des Internet-Explorers, dessen Entwicklung 2015 eingestellt wurde.<br>Der Internet Explorer wird von Microsoft unter Windows 7 unterstüzt. Microsoft empfiehlt den neuen Edge zu installieren.<br>Sie sollten Edge, Chrome, Firefox, Safari oder Opera benutzen.<br>', 'msgmore': 'Bitte verwenden Sie einen neuen Browser von dieser Seite.' }, }; function $buo_f(){ var e = document.createElement("script"); e.src = "//browser-update.org/update.min.js"; document.body.appendChild(e); }; try {document.addEventListener("DOMContentLoaded", $buo_f,false)} catch(e){window.attachEvent("onload", $buo_f)}Perhaps this can help somebody.
Sorry for my bad English. That’s why it’s not so easy to understand my issues.
Now I added
define('PODS_SHORTCODE_ALLOW_SUB_SHORTCODES',true);to my wp-config.php.Basically I want match the ID of the current post to show the fields of the custom-fields of the current post.
Example:
Pod: members
custom-fields: phone (field-type: Phone), downloads (field-type: File / Image / Video)Entries:
id=1, post_title: Tarzan, post_content: King of the jungle, phone: 999-111, downloads: tarzan.pdf
id=2, post_title: Simba, post_content: Lion King, phone: 999-222, downloads: simba1.pdf, simba2.pdf
id=3, post_title: Arielle, post_content: The little mermaid, phone: 999-333, downloads: arielle.pdfTo display also the custom fields without modifying the wordpress-theme, I add this code into post_content of Tarzan:
[pods name="members" template="my_template"]template: my_template:
<ul> <li>Phone: {@phone}</li> <li>Downloads: {@downloads}</li> </ul>Now I look at domain.com/members/Tarzan:
The result is:
Tarzan
King of the junglePhone: 999-111
Downloads: http://domain.com/wp-content/uploads/2019/12/tarzan.pdfPhone: 999-222
Downloads: http://domain.com/wp-content/uploads/2019/12/simba1.pdf http://domain.com/wp-content/uploads/2019/12/simba2.pdfPhone: 999-333
Downloads: http://domain.com/wp-content/uploads/2019/12/arielle.pdfUnfortunately not the result I want. I want:
Tarzan
King of the junglePhone: 999-111
Downloads: http://domain.com/wp-content/uploads/2019/12/tarzan.pdfSo I tried the following pods-code:
[pods name="members" template="my_template" where="id={@id}"]
and
[pods name="members" template="my_template" slug="{@id}"]The result is:
Tarzan
King of the jungleOkay, the code doesn’t work.
That’s why I added
define('PODS_SHORTCODE_ALLOW_SUB_SHORTCODES',true);to my wp-config.php.Now I wrote:
[pods name="members" template="my_template" where="id={@id}" shortcodes=1]
and
[pods name="members" template="my_template" slug="{@id}" shortcodes=1]The result is:
Tarzan
King of the jungleOkay, obviously {@id} inside the [pods …] doesn’t work.
Now I am at a loss.
Thanks for your help.
Best regards, Reflexa
Hello Jory,
I think you don’t understand my problem.I’ve got got an PODS-Template with [each]HTML {magic-tags} HTML[/each]
I could use the code of PODS-Template without a pods-template inside the post-content-field.
But I want a shorter code – and I think it’s much more easier if I change one pods-template instead of the [pods-code] in many posts.The problem is now: A pods-template shows many results, but I want only to show the fields of the current post and not from other posts.
Best regards, Reflexa
Hello Jory,
Pods template.
Thanks,
Reflexa