Wordpress Functions
WordPress using many functions some of the functions is power by PHP (Hypertext Preprocessor) language. we can add more function into wordpress themes by using Plugin or add directly to themes functions.php file.Now this article will tell you some function of wordpress that wordpress developer usually use when they develop a website and how to use it.
wp_options
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
<?php wp_head();
wp_footer();
?>
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php home_url(); ?>
The home_url template tag retrieves the home URL of the current domain name of website.
ex: <a href="<?php echo home_url();">Home</a>
<?php echo get_template_directory_uri(); ?>
this function use to get the parent theme directory URI of current themese
eg:<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png"/>
<?php wp_nav_menu(array()); ?>
this function is use to assigning menu on your themes.
ex: <?php wp_nav_menu( array( 'theme_location' => 'category_menu', 'menu_class' => 'nav-menu cate' ) ); ?>
go to see how to assign a menu in worpress themes.
<?php dynamic_sidebar( 'sidebar-2' ); ?>
This function is use to geting widget that you has been registered.
go to see how to register widget in wordpreses.
0 comments:
Post a Comment