• I’ve searched high and low and maybe I’m just searching with the wrong wording. Please forgive me I’m nowhere near a php expert.

    I have multiple sites that I administrate and the all have the same sidebar widget that includes links/images to our main site and affiliates. Rather then have each site administrator copy and paste the ad code in a text widget is there a way that I can just hard code the following code directly and have it work? I’ve tried but it doesn’t work.

    For example:

    <?php include(“http://wordpress.org/banner.php&#8221;); ?>

    That’s it. So that way I can create a simple document with all our banners, images and links in one simple “banner.php” file so when modified, it modifies all the sites that pull that same include.

    Any light at the end of this tunnel would be awesome!! Thank you so much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • As you’ll read from this question/answer (http://stackoverflow.com/questions/3101327/using-includes-cross-domain-that-contain-php-code-failing) this isn’t a good practice.

    If you are looking to put sidebar content in place, especially in widget form, why not create a plugin that adds a widget to your site? Then your site admin’s can add the widget to their sidebar and when the plugin is modified, all of their sidebars will change with it.

    Thread Starter wayoutwestmultimedia

    (@wayoutwestmultimedia)

    Yeah not exactly what I wanted to do. Problem is I want to control all ad content on our sites without having to rely on an administrator up update the content when they want to.

    Very informative link though, thank you for pointing that out.

    Can you think of any other options to do that function? I’d love to create a plugin to just do that, then have each site run the plugin and it’d do it automatically. Definitely not a plugin programmer. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using an include('http://wordpress.org"); link in my site’ is closed to new replies.