I would like to be able to use some code available from a website: this generates a CQC rating and link to the ratings page.
This code would be unique to each post - and I would like to copy the post into the post editor - then pull this into a dynamic toolest block in the template so it generates the button and link
The widget is here:
each centre has its own unique code for the cqc rating
hidden link
The code looks like this ( the id changes for each centre )
At the moment I have an html block ( non toolset ) on the template with 1 of the codes pasted in so I can see what it looks like - but essentially I need to make that are dynamic, ideally with a toolset custom field on the back end of the toolset post editor - which then pulls the code into position on the page..
the result of the static code in the html block can be seen here
hidden link
That is the result I would like to achieve .. but with code entry dynamic on the back end editor
I couldn't get the code working using a dynamic Id within the code
I did resolve and find a workaround...
1) Created a new custom field ( text )
2) Place the whole of the code script in the field
3) Used a single field block in the template
4) Used the post source to pull in the correct field - which generated a short code and displays the widget