开发者

Thesis theme adding a div

开发者 https://www.devze.com 2022-12-31 04:43 出处:网络
How do I add a div between the header area and c开发者_开发技巧ontent area of a thesis theme. What is the code I need to write in custom_functions.php file to do this? If that\'s not the place, where

How do I add a div between the header area and c开发者_开发技巧ontent area of a thesis theme. What is the code I need to write in custom_functions.php file to do this? If that's not the place, where do I need to make changes to get this done?


In your custom_functions.php file add the following code:

function my_div()
{
     echo '<div>Some new DIV between the header and content</div>';
}

add_action('thesis_hook_after_header', 'my_div');

You my want to reference Thesis Hooks and the DIYThemes site for more specific Thesis help.


You'll need to edit the theme files. Probably the header.php and the one where the one which contains the body. Before you fire off questions like this, please read through http://codex.wordpress.org/Theme_Development.


One really easy way, is to use Thesis Openhooks. Select the one that's between the header and the content area. I use that method all the time, especially for images. Inside the hook, all you have to do is type the HTML code for the DIV (I tried to type it here, but the code disappeared after I posted the comment) and then I can add CSS code to it in custom.css. Hope this helps :)

0

精彩评论

暂无评论...
验证码 换一张
取 消