Trouble with Hook
-
My site is set up so that the right side bar uses a hook in the functions.php file to pull 1 of 2 forms. Certain pages that are listed ie ‘workbench-basic’ use one type of form (quoteform.php), and the pages that are not in the list default to using the (shortform.php) file.
So by default, each page i create always has one of the 2 forms attached to it.
How can I have create a page that does not pull any of the forms at all with these setting? Is there anything that I can add to this hook to fix this or any other way while not changing the current settings for other pages.
I have posted the code below and the website link is: mobilemarketing101.org/steelsentry
Hook Code in function.php file:
// Shortform or Mini-QF add_action('before_sidebar_rt', 'ss_whichform'); function ss_whichform() { if (is_page(array( 'workbench-basic', 'workbench-basic-1', 'workbench-master', 'workbench-master-1', 'workbench-double', 'workbench-corner', 'workbench-u-shaped', 'esd-workbench', 'testesdpage', 'testformnew', 'styleform-four', 'lan-station-mini', 'lan-station', 'lan-station-corner', 'lan-server-cart', 'rover-cart', 'base-cart', 'rx-table', 'modular-cart', 'microscope-table', 'wall-unit', 'lab-island', 'packing-station', 'shipping-station', 'print-shop-station', 'custom-new-facility' ))) { include(TEMPLATEPATH . '/mini_quoteform.php'); } else { include(TEMPLATEPATH . '/shortform.php'); } }
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
- The topic ‘Trouble with Hook’ is closed to new replies.