Hi Matt, sorry to bug you on this again. I went back to add a single link using the shortcode that appears in the far right column of the simple links page. However, when I put that shortcode (e.g., [DiviShortcode id=”29508″]) into the text module, nothing shows up. I love that I can select the links from the standard WP add link tool, but I would prefer to use the shortcodes because all external links appear in at least two pages on my site, so when I have to update a link, I would prefer to do it in simple links. I could create a category for each link, but that seems kind of excessive.
What am I doing wrong?
—Andrew
Hi Andrew,
You may accomplish this by adding a filter to your active theme’s
functions.php
file:Then in your shortcode you could specify which link you want to show by adding a custom “one_link” attribute with the link’s id like so
[simple-links one_link="29508"]
Have a great day!
Mat Lipe
Hi Mat, this worked perfectly. Is there a way that I can use a simple-link shortcode so that the link shows up as an inline link and not as a bulleted list item? I would like to use simple-links for all links on my site, even those that appear in paragraphs. Is this an easy thing to do? I have been through the developer docs and it looks like it should be doable, but I am still pretty new at php.
—Andrew
Hi Andrew,
If you add the following filters, the links will display inline.
Have a great day!
Mat Lipe