Tactics with the [pgn] shortcode

With WordPressChess, you can display tactics board for a single game using the [pgn] shortcode.


[pgn tactics="1" width="60%" float="left" theme="wood8"][setup "1"]
 [eventdate "1998.??.??"]
 [castle "1"]
 [index "5"]
 [ts "1487793861742"]
 [event " White to move."]
 [site "?"]
 [date "1998.??.??"]
 [round "?"]
 [white "White mates in 2"]
 [black "White mates in 2 1001 Brilliant Ways to Checkmate"]
 [result "1-0"]
 [fen "6R1/p4p2/1p2q2p/8/6Pk/8/PP2r1PK/3Q4 w - - 0 1"]
 [plycount "3"]
1. Qe1+ Rxe1 2. g3#[/pgn]

You can see the result to the left.
The PGN is inserted between the start and end of the tag.
As you can see, the pgn contains a starting position(fen) and the moves required to solve the puzzle.
The property "tactics" has been set to 1 to enable tactic features instead of a game viewer.
To make the board appear a bit smaller on large screens, I have set the width attribute to 60% and the float attribute to left. float="left" positions the board to the left with text wrapping around it on the right side.

Share This:

You may also like...

1 Response

  1. Tried to contact you earlier. The free version having some problem to install. Is it possible to test the paid version? If it works i want purchase. Please contact.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.