Directly load sidebar.php template.
-
Can I direclty load the sidebar.php or include it with some file so dynamic widgets get processed by wordpress? Without having to load a page?
Currently I have created a random Page, assigned it a Page Template I made that only contains sidebar loading, and accessing that page. I am loading with jQuery so I can pass along the ID of the page you are on to override that random page I made.
Basically I am loading the sidebar with jQuery.
EDIT: Looks like I stumbled across it and it seems to be working.
<?php require_once('../../../wp-load.php'); ?>
(relative to a file in my theme) at the top of my file. Then I can put all my sidebar code, etc and process just like WordPress.
- The topic ‘Directly load sidebar.php template.’ is closed to new replies.