Reputation: 825
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
Upvotes: 0
Views: 177
Reputation: 1429
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_detailsfunction to retrieve the current site details.
Upvotes: 1