use system script advertising in wordpress multisite

I have write : <?php $blog_id = get_current_blog_id(); ?> <?php if( 1 == $blog_id ); ?> <div id=””><script src=””></script><script src=”” ></script></div> <?php elseif( 2 == $blog_id ): ?> <div id=””><script src=””></script><script src=”” ></script></div> <?php else: ?> Default script <?php endif; ?> It correct !?

WP MS: How to query over the network

[*] Each site in a Multisite network is considered to be exactly that — a separate site. All the $wpdb values (eg, $wpdb->posts) are distinct for each site. You can use switch_to_blog() and restore_current_blog() to get content (posts, etc) from the various sites[*] in your network: $sites = array( 1, 2, 3, ); $all_posts = … Read more

How to get a current post’s blog id

Here’s a quick way you could do it, though there are quite likely easier/better ways to do it. This is just what I can think of at the moment. Add a quick function to functions.php that will store the blog ID in the post meta. Then when you need to check where the post came … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)