OK – I give up – how do we pull home site name into a $variable
-
So what I’m trying to do is create a function where the HOME site name is stringed for use as a default fallback string in a naming convention for images, e.g. (along these lines, this is not proper code) –
if !exists ($image-folder . $child-blog-name . $this-month . ".jpg" ) { $page-bg-image = $image-folder . $home-blog-name . $this-month . ".jpg"; } else { $page-bg-image = $image-folder . $current-blog-name . $this-month . ".jpg"; }
Problem is, after hours trawling backwards and forwards in the codex, the only function I could find to do anything like this was blog_info(‘home’) – which would then need string stripping to get the home blog name out of the URL … but that’s been deprecated !!!
So two questions really –
1. – how do I use a native WP tag to acquire the NAME of the home blog
2. – how do I use get_blog_info() to get the url of the home blog for a fixed link in the theme header? (The home BLOG index is not the site front / home page).Completely stumped now – so much for child theme making being easy … so far, I prefer the old hard-coded way under WP2.5 and earlier. At least that didn’t bury stuff under umpteen layers of cascading functions.
- The topic ‘OK – I give up – how do we pull home site name into a $variable’ is closed to new replies.