How to insert [shortcode] into HTML or other code in blocks?
-
Hi,
What is the best most efficient way to insert desired [shortcode] into strings of code in Ad Inserter blocks?
For example, maybe we want to put a link to a Google search based on the post title.
Post title is “How to Buy Bitcoin”
So Google search url would look like:"https://www.google.com/search?q=how+to+buy+bitcoin"But we want to use shortcode in URL so all posts will have link to Google search based on the UNIQUE post title. So we would try something like this…
Ad Block content:
<a title="[adinserter data='title']" href="https://www.google.com/search?q=[adinserter data='title']">[adinserter data='title'] - Google Search!</a>But this does not work in Ad Inserter block because the shortcode does not get processed before the query to Google. We have found a workaround using custom functions to create shortcodes, but… is there a better and easier way to make it work just by using Ad Inserter blocks to handle the necessary custom functions?
Thank you for making an awesome plugin!
- This topic was modified 6 years, 1 month ago by .
- This topic was modified 6 years, 1 month ago by .
- This topic was modified 6 years, 1 month ago by .
The page I need help with: [log in to see the link]
The topic ‘How to insert [shortcode] into HTML or other code in blocks?’ is closed to new replies.