Viewing 5 replies - 1 through 5 (of 5 total)
  • A text widget won’t process any PHP code, so that’s out. The include directive is most likely stripped out too, but you can look at the source code of your pages to check that.

    What I’d suggest is that you create your own widget and use that to display what you’re looking for. That way you’ll have the ability to run whatever PHP code you need to, which would allow this include very easily.

    Thread Starter tpo@tpo.net

    (@tpotponet)

    the code isn’t PHP though, and it DOES work in text boxes:

    <IMG SRC=”http://tpo.net/Small Banners/Tomo Small banner.jpg” WIDTH=”300″ class=”aligncenter” BORDER=”0″ >

    <HR width = ‘150’ color = ‘#067300’ >

    and I haven’t a clue how to ‘create a widget…’ perhaps there already is one for this, but I’ve not found it…

    Thanks anyway!!

    OK, but that code is nothing like what you had in your original post. If I knew that you could just add in the image like that, that’s what I would have suggested.

    The only issue with that is that you’ll only ever have that image on the sites. I’m guessing that this is for an advertising banner of some kind, which normally includes a link to which ever promo section that it’s trying to advertise. That link would also need to be hard-coded on each page, and if the URL changes for a future promo, you’ll still have to change all of the sites manually.

    The link that I gave in my previous reply does step you thorugh the process of creating your own widgets, but it is a bit of programming-speak, so it may seem like it’s a bit ot much at the moment. Depending on how far you want to go, this might be a good time to dip your toes into this and see if you can create something new for yourself.

    Thread Starter tpo@tpo.net

    (@tpotponet)

    my bad… I read your first note in the email & did not see the link… I’ll check that out, thanks!

    thing is w/ this, is I have some 18-20 banners,each linking to a different website…

    on an old school website I just used:
    <!–#include virtual=”http://tpo.net/TPOsBanners.htm&#8221; –>

    and the entire file of code would appear.
    the other methods in my first post were suggestions in other posts on the forum…

    I will check out your widget making link 😉

    Be well!

    Thread Starter tpo@tpo.net

    (@tpotponet)

    Yay!! resolution: http://wordpress.org/plugins/php-code-widget/
    plugin and then using

    <?php include (‘../TPOsBanners.htm’); ?> since all my domains are on the saame server, otherwise it would need the full path, something like:

    /var/www/mysite.com/public_html/script.php

    works like a charm! I appreciate your help, Caustic one 😉

    tpo

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘calling an external .txt or .htm file from a text box widget’ is closed to new replies.