Archived topic
Add header code
3 replies · Started by Michael on August 25, 2019
Apologies if this has been covered in another thread, I couldn't see anything in a similar vein. I am needing to add chess games to a few sites and am testing both the RPB Chessboard plugin and an alternative from another site (Chessbase). For Chessbase to work I need to add some code to the header as described at https://play.chessbase.com/en/howto/embedpgn
Temporarily I have used a plugin for this but wonder if this is best practice or should I amend the header.php file via a child theme?
Secondly, is there an easy way to change the board background from the current brown to white at https://socialcorrespondencechess.org/test-game-01/
Many thanks,
Hi there,
you can add the code links they provide using the WP_head hook in the Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
The advantage there is you can select the Display Rules for which pages you want the scripts to executed on.
The Chessboard is output using a Canvas element which is controlled by there Javascript - so not much i can do to help change the colors. Maybe the code author has some advice.
Thanks David,
Greatly appreciate your advice. Will take a look at the hook elements.
You're welcome