Tuesday, 10 September 2013

How to get Site URL..?

This is the method to get site URL for example ( www.abc.com/ )
main purpose behind this when you want to add some image or want to fetch some data from server which is present on some Folder than you put this code before that folder.

TO link the logo with main site link we use:
<?php echo get_site_url(); ?>

 Gave directory path of active theme
<?php echo get_bloginfo('template_url'); ?>/ FOLDER-NAME


Subscribe us for Important Knowledge of word press.Your's suggestions are most welcomed..

No comments:

Post a Comment