WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Calling a .txt file (or similar) (3 posts)

  1. pedmands
    Member
    Posted 6 years ago #

    I'm looking to call information from a .txt file to be used on a non-widgetized sidebar. For instance, if I want to easily update the "Upcoming Shows" section on the right sidebar here: http://www.prestondemands.com/amp I could just type a new line or even add an

  2. to the text file and wordpress could call it into the XHTML.

    Does that make sense?

    Again, the side bar is not widget-enabled, otherwise I'd easily be able to do this with a Text widget. However, I cannot find a way to add those horizontal dividers with a widget-enabled sidebar.

    New to this, so thanks in advance!

  • Something like:

    <?php include 'file.txt' ?>

    should do it. You'd have to get the path to the file correct, relative to your theme folder, so if your blog was in example.com/wordpress, and your text file was in the wordpress folder, you'd put '/wordpress/file.txt'

  • pedmands
    Member
    Posted 6 years ago #

    thanks!

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags