I'm working in WordPress... and I need to show different post on the footer. The thing is... I had a multi-site with two sites, so It was easy to customize as I want each footer with
if(is_main_site()) {
} else {
}
But now I have added another site, how can I select, with php one site or other?
I have checked WordPress codex, but I can only find is_main_site referring to multi-site.... does anyone has an idea about what can I use?
Thank you
You should use a conditional function.
WordPress provides the get_current_blog_id() function, using this function you can create a switch statement to add your custom footer.
Also, you can check the get_blog_details function to retrieve the current site details.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.