Answers for "wordpress change home page"

PHP
3

home url wordpress

$url = home_url();
echo $url; // Output: http://www.example.com

$url = home_url( '/' );
echo $url; // Output: http://www.example.com/

$url = home_url( $path = '/', $scheme = 'https' );
echo $url; // Output: https://www.example.com/

$url = home_url( $path = 'example', $scheme = 'relative' );
echo $url; // Output: /example
Posted by: Guest on February-08-2021
0

wordpress is home page

is_front_page()
/* is_front_page() returns true if the user is on the page or page of 
posts that is set to the front page on Settings->Reading->Your homepage 
displays. */
is_home() 
/* is_home() return true when on the posts list page, 
This is usually the page that shows the latest 10 posts. */
Posted by: Guest on March-09-2022

Browse Popular Code Answers by Language