Add a Twitter share link that validates

I found that my page wouldn’t validate at W3C Validator because of a Twitter button.

Here is a very easy way to make a Twitter button that does validate in Textpattern.

Make a form and paste in:

<p><a href="<txp:permlink />" class="twitter-share-button">Tweet</a><script type="text/javascript" src=""></script></p>

Then put:

<txp:output_form form="twitter" />

Wherever you want the button to appear.

The button opens a Tweet window with the page title and url already in place.

comments powered by Disqus