Created
April 8, 2023 22:27
-
-
Save ali7ali/8b90cf171dd7fdbc445d7d775bd3561e to your computer and use it in GitHub Desktop.
Run code for specific subsite in WordPress multisite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$site_id = get_current_blog_id(); // Returns Integer | |
if( $site_id == 237) { | |
add_action('hook_name', 'function_name'); | |
} | |
function function_name() { | |
// Your code here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment