I have used a PHP code to show the welcome banner on the “Home” page of my website but here I am facing issue. When I am using custom link “Home” page and selecting latest posts under reading then the banner is coming up at my Home page but rather than a custom link when I am creating the “Home” page from the pages section and using latest posts then I am getting the banner on the website domain address page but when I am clicking “Home” then the banner disappears as the “Home” page domain changes to domain-name/home.
So, to change the “Home” page address when I am going to reading<<static<Homepage(Home) which makes my “Home” page URL as that of my website domain, but then my banner completely disappears from my website and not even coming on any page. However, when I am putting that “Home” page as my blog posts page under static then the banner comes on my “Home” after that but then again my “Home” page URL changes to domain-name/home.
The way I want it to go like: I want “Home” page under reading<static as my Homepage and with the banner reflecting on my Home page as the URL of home page will be same as that of website URL. So, this will solve my all issues.
How can I do this?
By the way this is the PHP Code I have used for welcome banner:
add_action( ‘generate_after_header’,’gp_custom_banner’ );
function gp_custom_banner() {
if(is_home()) {
echo “
Hi, I’m Kelley Jenner. I’m the blogger behind this wonderful blog.
I’m here to help you stop feeling overwhelmed and burned out so you can enjoy a more intentional and well-balanced life. “;
}
}
Please look into this and tell me how can I do this change.