I used Theme Options page from the Tutorial of Ian Stewart in some of my WP site, and it works just fine. What I did externally was this (closest English Tuts). All those sites were single sites. But now I'm dealing with a WordPress Network.
As I'm developing a single theme for all the sub-sites, I'm placing the theme-options.php
into my theme as a common file. As per my search, I got a conditional statement:
global $blog_id;
if( $blog_id == '1' ) {
//do things for first site
}
Do I need to echo the same code of the theme-options.php
under two such block to activate different thing in different site?
Or, do I need to made two different theme-options.php
and conditionally load them for different site?
global $blog_id;
if( $blog_id == '1' ) {
require_once ( get_template_directory() . '/theme-options.php' );
} elseif ( $blog_id == '2' ) {
require_once ( get_template_directory() . '/theme-options-bengali.php' );
} else {
require_once ( get_template_directory() . '/theme-options.php' );
}
Please note: Two of my site's settings, in many cases could be different and I'd need to grab them differently for the front-end.