New Blog Template auto insert blog owner into content of new sites

Obviously, as you'll see, I'm not a coder at all. I've searched and can't seem to figure it out and now am confusing myself.

Here's what I'm trying to accomplish... I'm building a company site with multisites. Using New Blog Template, I want to create a blog template that has many pages of content that contain links similar to affiliate links. All links will be formatted the same way - username.affiliatelink.com where username will be the blog owner's wordpress username. New blog owners will be forced to use their affiliate username as their wordpress username to keep it synced.

Is there a way to use a shortcode or something simple so when I create a post or a page in New Blog Template I can include a link that will auto populate correctly when each new blog is launched?

For example: The post or page or maybe even widget in the template would contain the shortcode for the link like
[shortcode-of-blog-owner-username].affiliatelink.com
that would render an actual link like http://username.affiliatelink.com. If the blog owners username is, Joe the affiliate link would be Joe.affiliatelink.com. I am not talking about the url of the created blog I am strictly talking about the links on pages or posts.

The end result is every new blog launched will automatically have the correct affiliate link on every page needed making it so new blog owners don't have to edit a thing.

Hopefully, I've been clear enough.

Thanks!!!

  • aecnu

    Greetings Patrick,

    Thank you for bringing this item to our attention.

    It appears that it will take custom coding to code it so that the blog and affiliate ID's are created almost simultaneously.

    The affiliate integration is a core component of this particular project as well.

    What script/software is managing the affiliate program, any chance it is the WPMU Dev Affiliates plugin or?

    Also I would like to add the code to get the

    <?php bloginfo(’url’); ?> which is the variable that returns exact url of the blog

    Please advise.

    Cheers, Joe

  • Patrick

    Thanks. Its not actually an affiliate link or the affiliate plugin but rather a custom link that I could just add on a page.

    Kind of like each franchisee already has their own site (nothing to do w/ wp multisite) and their address' would be franchisee1.company.com , franchisee2.company.com etc.

    I want them to sign up for a wp multisite using "franchisee1" as their username and posts that contain a link to *.company.com could use blogowner name in place of *

    I fear I don't understand code enough to ask the correct questions.

    Let's say Subway gave each store its own generic site with a subdomain of something like atlanta.subway.com. I want to provide a better site they can use but it would contain links back to that corporate site.

    I want them to sign up as username "atlanta". In the New Blog Template there could be an about us page with information on whatever but then a link to *.subway.com to take them to the corporate site. Is there some shortcode to insert the "blog owners username" in place of * ? That way each new franchisee that signs up doesn't have to edit page by page to fix links.

    Thanks so much for your time and help.

  • aecnu

    Greetings Patrick,

    Thank you for your additional input in the post before last and the last post.

    Sorry that this ticket got away, it appears to have been eaten by the ticket system and when you posted again it brought it back into play.

    I want them to sign up as username "atlanta". In the New Blog Template there could be an about us page with information on whatever but then a link to *.subway.com to take them to the corporate site. Is there some shortcode to insert the "blog owners username" in place of * ?

    This above statement tells me that you have a misconception of how this works and the corporate site should be indeed addressed at just subway.com - no asterisk.

    The asterisk is used exclusively as a wild card and does not address any specific site but by addressing just subway.com it indeed addresses the root of the MultiSite where the corporate site should reside.

    In response to the second post there is a code that returns the URL of the current site: <?php bloginfo(’url’); ?> : Returns exact url of the blog though I do not quite understand why you want to use it but there it is.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • Patrick

    Thanks for your help Joe.

    This still isn't what I'm looking for. That will work if placed in the code correct? What I want is that same function but to be able to post it in an individual post.

    What I'm trying to accomplish is a "replicated" group of sites that will not have to be edited individually.

    i.e. when I make a page on the New Blog template that says something like contact me by going to my contact page at user.site.com/contact. But each new site created will automatically go to newuser.site.com/contact

    Maybe this can't be done. If not thanks again for your help.

  • aecnu

    Greetings Patrick,

    Understood and though it sound simple enough it certainly is not simple to do if at all, but will indeed require custom coding that will need to assign the variable, match the user ID to the Site, and then input the site into the variable lastly inserting it into the URL.

    Note being a coder myself I am sorry that I cannot write it for you.

    However, alternatively you could see if there's a developer available at wpmu jobs who could get onto it right this minute

    Or you could always approach someone like Tweaky

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.