WordPress problem w/ function/action call in Thematic Child Theme
-
I have added the following action to my functions.php file:
function searchbox() { echo '<div id="search">' . get_template_part(searchbox) . '</div>'; } add_action( 'thematic_header', 'searchbox' );
When I load the page on which the searchbox should appear, it’s there, but, according to a look at the source code, the code from “searchbox.php” falls outside the #search div; the #search div appears as an empty div that follows the code from “searchbox.php”:
<form method="get" id="searchform" action="https://localhost/ls/"> <input type="text" value=""name="s" id="s"onblur="if (this.value == '') {this.value = '';}"onfocus="if (this.value == '') {this.value = '';}" /> <input type="submit" id="searchsubmit" value="Search" /> </form> <div id="search"></div>
I can’t for the life of me figure out why the code from “searchbox.php” doesn’t appear inside the div, as specified in the echo command contained in the searchbox() function. Anyone?
- The topic ‘WordPress problem w/ function/action call in Thematic Child Theme’ is closed to new replies.