alexander2021
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Add Javascript to a custom field and output it in the postHi thanks again.
we want to show ads on our blog via Tradetracker. They provide us with either a piece of JS-script or an iframe. I know I want to avoid iframe (that is why my original intent was to go for JS) but if it is easier to implement I would go for iframe for now.
So in Twenty Twenty One (with the stackable plugin) you can create reusable blocks. This is great for lay-out, but the contents will vary per post of course. So this means you will have to convert the reusable block to normal block on each post. This means that you will not be able to change the look and feel of this block globally anymore…making it a not so reusable block.
This is why I thought to put a shortcode to a custom field in the reusable block which fetches the piece of JS or iframe code from the individual custom field of the post and displays it in the post.
I hope it makes a bit more sense now. I’ll check your links in a minute.
Cheers, Alexander
Forum: Fixing WordPress
In reply to: Add Javascript to a custom field and output it in the postThanks mlchaves!
Writing the code itself is not the problem. I think I am facing a limitation in WordPress which I can’t believe tbh, haha.
Do you think it is possible with html code? I see the marketing company also provides html (iframe) code. I could paste this in a custom field. But how do I get it from there into the post (not adjusting the php or using a plug-in).
Thanks again!
HI Patrick,
I’ve worked my way around this, so I am happy. Well almost.
I have an auto-populate issue I need some help with now. I have these two fields. One is called audioguides and the other one is called headphones. I want the headphones field to be auto-populated with the number that is being filled in in the audioguides field on the same page. For example if someone needs 45 audioguides the headphone field should be auto-populated with 45 (after which the visitors should be able to change this of course.
Can you give me some pointers on this matter. I can’t seem to get it working with the available documentation. I do not know what to fill in in the query_parameter_key field.
Thanks again, Alexander
Hi Patrick,
You are right, sorry. Actually the guy from the service sale desk told me that it is possible to do what I want, but some tricks are needed. I think his name was Alex…