Use site_url
<?php echo site_url(); ?>
http://codex.wordpress.org/Function_Reference/site_url
Or get_site_url
<?php echo get_site_url(); ?>
http://codex.wordpress.org/Function_Reference/get_site_url
Or even home_url
<?php echo home_url(); ?>
http://codex.wordpress.org/Function_Reference/home_url
which returns the home URL for the site.
Check the doc links for differences in available parameters.
Related Posts:
- What’s the difference between home_url() and site_url()
- Prevent “main” WPMU site_url() being returned in functions
- Custom page with variables in url. Nice url with add_rewrite_rule
- Is it possible to use a forgot password url filter?
- Create Custom URL structure for specific Post category
- How can I rename the WordPress AJAX URL? [duplicate]
- Ninja form Redirect depending on text field content [closed]
- wp-comment author- url +, email filter hook
- Removing custom meta data
- WordPress on AWS Auto scaling and ELB giving 503
- WordPress converts media extention URL automatically to video player
- meta tags doesnt fetch data from permalinks
- Get arguments from URL
- Add unique id to Preview URL
- How can I set the SRC URL of the custom logo image?
- Need to convert image url to a Base_64 data url with wordpress function..
- Protect get_query_var from manual input in url
- Problem with images URL after filter applying
- include w_thumbnail_src in function?
- Create Custom URL structure for specific Post category using Post ID instead of post name
- Fetch URL parameter
- how can I change all wordpress media file url to custom cdn url?
- Custom route and extract data from slashes and parameter
- reWrite wp-content url to point on my cdn
- How to Override Page Template if URL matches query?
- Add #primary at the end of navlink permalinks on single posts
- Set URL Parameter Post Layout As Default
- Using Switch Statement to Change Image According to Last Digit of Topic ID
- Instead of using $post, how do i get the thumbnail image of the $post
- How to add a meta information to the URL?
- How do I change the URL returned by next_posts_link()?
- Function in functions.php by url
- How to customize the_archive_title()?
- How to override parent functions in child themes?
- Displaying the number of updates available in the Admin area
- Trying to use add_action and do_action with parameters
- Safe to disable wptexturize?
- Get a list of all available fields in the User Profile
- How do I use the WP image functions in a page template?
- How to remove Customize from admin menu bar after WP 4.3
- why doesnt is_home() work in functions.php
- Insert Ad Code in the Middle of a Post
- Enabling shortcodes for custom fields
- Add options to featured image
- WordPress Change Post Templates,but not drop down, but Image selection
- Programmatically Add Font-Awesome Icons to Category Widget
- Remove “says” from comments
- Reuse variable in hook callback
- Dynamically Register Sidebars For Each Top Level Page
- Run Product Filter Javascript On Page Template
- Can you use admin pages functionality on the frontend of your site
- How to add a column to the Trash page?
- Overwrite Parent Theme add_image_size in Child Theme
- Custom registration URL lost when user makes signup mistake
- Images uploaded using media uploader are appearing upside down
- Individually styling date month year [closed]
- Tiny MCE-modifications (plugins) stopped working in WordPress 5.6
- Writing functions in WordPress functions.php that don’t replace a WordPress core function
- How to hook into a function offered by a plugin?
- Change position of media in admin menu
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- show first 3 thumbnails of posts in different sizes [closed]
- Getting custom image size URL in functions
- new_excerpt_more link not working properly
- Where to add the permalink in this function?
- WordPress function saves a post twice and updates all posts
- Change CSS for logged in users
- if statement for wordpress default featured image on single post
- Function to display post by specific author
- Return category name with & Ampersand doesnt work
- Control the srcset much more (not all sizes in it each time)
- Warning: join(): Invalid arguments passed in post-template.php
- javascript and css links not working on sever
- is_page() or is_single not working
- What are the meta fields for an attachment?
- Adding product to WooCommerce cart [closed]
- Add loggedout class on body using a function or JS
- Insert a field with PREG_REPLACE – strange behaviour
- Difference between get_userdata() and get_currentuserinfo()
- Featured Image and Tags problem
- Advanced method to control cache of enqueued style/script
- How to require a config file in a template and in function.php?
- Issue passing action class to nested function. Admin Columns
- Populate Product Regular Price with a calculated ACF Field Value
- How to make the RTL.css the dominant css code?
- Auto remove tags on certain date
- get_field() with ID in one signal filter not working
- Is there any requirements to do socket programming with WordPress?
- Rest API User Levels
- adding google analytics via echo or between tags
- Slider Thumbnail Size Issue [closed]
- same get_posts function works diffrently in tag.php and functions.php
- Call custom field using php
- How to Update User Meta Field other than from profile?
- Retrieve array of attachment IDs attached to a given Post ID
- add_theme_support not outputting thumbnails
- update_user_option not working as expected
- How do I access variables outside a function [closed]
- PHP Notice: Function is_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false
- How to get variable from other function inside class function using add_action for Ajax call