kennibc
Expert
Friendly Neighbour
Member Likes (0)
Hello All,
I have been using the New Blog Template plugin and I want to know if it is possible to allow users to pick from a selection of templates instead of only getting the default?
If it is not currently possible may this post serve as a suggestion for future improvements.
Thanks for your time in replying,
Chris

Responses (20)
WPMU DEV Fanatic (joined October 2009) Likes (0)
Hi Chris,
There's not a way to achieve that built into the plugin, but I'm really glad you asked as I'd been meaning to get around to trying the snippet provided by asimetrick in the following thread:
http://premium.wpmudev.org/forums/topic/template-choice-at-registration
So basically, that snippet does provide the option when using BuddyPress. However, as noted in that same post, the blog field isn't hidden, but displayed by default, regardless of whether the blog creationg option is ticked or not.
But it does work, with BuddyPress that is. Perhaps that'll work for you until a permanent solution is included in the plugin?
Cheers,
David
Member (joined October 2008) Likes (0)
Hello David,
I copied that code and added it as a network activated plugin however it didn't work. I do have buddypress so that isn't the issue.
Any further suggestions?
Member (joined July 2011) Likes (0)
Hi Chris.
I'm the one who provided the code snippet. Could you just tell me what exactly doesn't work? Is the dropdown displayed in your registration page? If no, do you use BuddyPress's default theme or a custom one?
Thanks.
WPMU DEV Fanatic (joined October 2009) Likes (0)
Hmm, one other thing you might want to check Chris. When I initially installed this, as a plugin as well, I had the <?php ?> tags wrapping both the initial plugin comments as well as the rest of the code, with a line break between the two. It yielded an error message at the top of the admin but still remained activated. If that's how you've got it setup, simply removing the middle ?> <?php tags should sort it.
Other than that, as asimetrick's alluded, perhaps there's a theme conflict? Perhaps there's also another plugin conflicting as well?
Cheers,
David
Member (joined October 2008) Likes (0)
Asimetrick,
I am using the EduClean theme from WPMUDev. The dropdown is not displayed.
David,
I will look into how the PHP tags are placed but I didn't get any error messages.
Thanks. I will try to get this hack working.
Hopefully someone will add this feature to the original plugin. In my situation this could be very useful because I have teachers who could benefit from a more basic template and those who would benefit from a more advanced template with more interactive WP plugins activated and configured.
-Chris
Member (joined October 2008) Likes (0)
I tried this plugin, but when it creates a new blog it doesn't necessarily add any additional database fields used/created by plugins: http://buddypress.org/community/groups/site-creation-wizard/
If the New Site Template plugin could incorporate the front end useability of the Site Creation Wizard plugin it would be ideal.
So that's my feature improvement suggestion for this plugin.
I am still tinkering with the plugin code but no luck so far.
Member (joined July 2011) Likes (0)
I don't know the EduClean theme and I can't test it right now so I can't tell. I just checked the 'bp_after_blog_details_fields' action in the registration page and everything looks all right in the code, exactly the same as the default BuddyPress theme.
So I must let David take this one, sorry.
Member (joined October 2008) Likes (0)
Actually the theme I am usign is this one http://premium.wpmudev.org/project/the-edublogs-homepage-theme
Member (joined July 2011) Likes (0)
Yes, I downloaded it and took a look at the registration page. That's where I saw everything looked good in the code with the 'bp_after_blog_details_fields' action. I really don't know why it doesn't work. If I had more time, I could troubleshoot it, but the installation process of the theme package looks very heavy for something I'll never use for myself and I'll have to crash or revert just afterwards. That's why I let David help you from this point.
Member (joined October 2008) Likes (0)
Ohhh..... on the registration page!
Is there anyway it can be hooked into the "Create a blog" page where they register the name and site name of a new blog?
My users register via LDAP and they are not forced to register a blog. They simply login and then proceed to the Create a Blog page where they can create a new blog site.
Member (joined July 2011) Likes (0)
You're right, I missed that one. Try this:
add_action( 'signup_blogform', 'blog_template_for_bp' );I haven't tested it but it's the best of what can be done with the create blog page.
Does it work?
Member (joined October 2008) Likes (0)
Where do I add that snippet specifically?
Member (joined July 2011) Likes (0)
In your custom plugin where you copied the original snippet. Just add it below.
Member (joined October 2008) Likes (0)
AWESOME AWESOME AWESOME!!!!!!! That did the trick!!!!
Member (joined July 2011) Likes (0)
You're welcome.
Member (joined October 2008) Likes (0)
In the future for noobs like me here is step by step what you will want to do.
Open notepad and copy/paste this code into the blank document:
Save the file as pickatheme.php inside a folder named pickatheme.
Upload the folder into your plugins directory and activate it network wide.
Member (joined October 2008) Likes (0)
Just wondering... How would I add the following code so that it appeared above the Template dropdown menu via the plugin listed in the above post:
This adds directions and links to the templates being used so users can better determine what template to choose.
Member (joined July 2011) Likes (0)
Hi Chris.
The recipe is exactly the same:
If the explanation is displayed below the dropdown, change the last 2 lines by:
You also could use the same function as above to include this additional custom code, but as you requested, that function might be soon integrated in the plugin itself so you can't customize it anymore.
On the contrary, this solution doesn't prevent your form to be additionally customized by any other plugin you use so "something" might be injected between your explanation and your dropdown. If you don't have such plugins, then everything should be alright.
Member (joined July 2011) Likes (0)
Awesome hack! exactly what I was looking for.
Initial results on a MultiDB 256 config - I am able to create a template site upon signup which copies ALL content - problem is the test user that created the new site is not the site admin of the new site. The site admin of the new site is the network admin upon checking the back end.
Will test this on another server with a fresh install of 4096 MultiDB and no other plugins.
Member (joined July 2011) Likes (0)
Update.
My mistake on the previous post- all I had to do was uncheck the "users" setting on the blog template and it was good to go.
New problems though. When I create a site, no matter what template I use, it always creates the default template, and when I remove the default template option, it creates the default wordpress twentyeleven template.
Any ideas on why I am getting this behavior on both the 256 and the 4096 MultiDB setups?
Become a member