WikiLink Optional Parameter

Version 3.3 added an optional parameter to the WikiLink shortcode called “anchor”. This allows you to link to a place inside of a wiki page.  The parameter needs to be added manually and the target needs to be set on the target page manually.  If “anchor” has a value, the parameter is checked to see if it has a “#” in front, if not then a “#” is added.  The anchor variable is appended to the end of the permalink.  The syntax would look like this:

[yadawiki link="Coffee and Tea" show="Hot Beverages" anchor="#jumptarget"]

The output on the page would look like this:

<a href="http://wikitest.local/wiki/coffee-and-tea/#jumptarget" class="wikilink-published">Hot Beverages</a>

Here is the target syntax:

<h2 id="jumptarget">This is the Jump Target</h2>

Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. You will still pay the same amount so there is no extra cost to you. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”