how to insert code using widgets OR child function file
-
I relatively recently switched to a child theme of twentytwelve I’m having fits trying to include a file on my side bar. The file shows variable entries that are based on what the date is. I used to use the following coding on the sidebar:
<?php include($_SERVER['DOCUMENT_ROOT'] . "/textfiles/special.php"); ?>
But, of course, php coding cannot be used in widgets.
I’ve tried to search for the answer but do not know what search words to enter in order to find it….
I’m guessing that I could achieve this by putting code into my theme’s functions file. But I’m stymied (a little knowledge of coding truly is a dangerous thing) about what exactly to put to include the file to appear just after the calendar on the sidebar.
Could someone please point me in the direction of a page that outlines in dummy-fashion how to achieve this?
Thank you.
-E Morris, etherwork [dot] net [slash] blog << URL purposely left unlinked in an attempt to keep spammers at bay
edit: in the meantime, I’ve hardcoded the entry that I would like to appear for the month of December.
- The topic ‘how to insert code using widgets OR child function file’ is closed to new replies.