Categories
PHP Wordpress

Basic wordpress functions

All functions you want to overwrite, you can put it inside functions.php on your child theme, regarding pre-established functions:

  • get_header grabs header.php

  • get_footer grabs footer.php

  • get_sidebar grabs sidebar.php

  • get_searchform grabs searchform.php—if this is missing, WordPress simply renders a default search form

  • comments_template grabs comments.php

  • get_header('custom'), for example, will grab a file called header-custom.php
  • get_template_part('partname'), which grabs a template called partname.php
  • include(STYLESHEETPATH . ‘/extrastuff/somefile.php’); use the path to your stylesheets to get to a file, you can also use TEMPLATEPATH

Leave a Reply

Your email address will not be published. Required fields are marked *