help: How to programmatically style a links in posts
-
Hi,
Just wondering if there’s a way to automatically style links in a post through code rather than manually going through each post and changing the link to run a button shortcode to style the link. For example to replace
<span style="color: #0000ff;"><a id="www.google.com/page1" style="color: #0000ff;" target="_blank" rel="nofollow"></a>Goto Google</span>
with
[action-button color="blue" title=Goto Google" subtitle="" url="www.google.com/page1"]
The Link is not static, as it relates to the post topic, so users can click the link and go to that page they are reading about.
I guess I could make a db procedure to grab the link from the post (I guess mysql still has an instr function), and then recreate the post with the new link with an update query, but it could have erratic results. Just wondering if there’s an easier way, or if someone has already created a plugin to do this?
- The topic ‘help: How to programmatically style a links in posts’ is closed to new replies.