WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Outside the loop? (3 posts)

  1. fireworkszone
    Member
    Posted 7 years ago #

    I'm not a blogger, I just wanted an easy way to post news updates on my site and it seems like wordpress is the answer.
    Anyway, onto my question. I removed the header and footer as my aim to incorporate the wp posts into my own site design.

    Inside my website's index page I included a root.php file like this:

    switch ($root) {
    case"1":
    include("tuts_en.php");
    break;
    case"2": etc...

    default: include("central.php");

    So, I included inside the central.php file:

    <?php

    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    And I get error messages:

    Warning: Cannot use a scalar value as an array in locale.php on line 38

    Warning: Cannot use a scalar value as an array in locale.php on line 39

    Warning: Cannot use a scalar value as an array in locale.php on line 40

    Warning: Cannot use a scalar value as an array in locale.php on line 41

    Warning: Cannot use a scalar value as an array in locale.php on line 42

    Warning: Cannot use a scalar value as an array in locale.php on line 43

    Warning: Cannot use a scalar value as an array in locale.php on line 44

    Warning: Cannot use a scalar value as an array in locale.php on line 45

    Warning: Cannot use a scalar value as an array in locale.php on line 46

    Warning: Cannot use a scalar value as an array in locale.php on line 47

    Warning: Cannot use a scalar value as an array in locale.php on line 48

    Warning: Cannot use a scalar value as an array in locale.php on line 49

    Sorry, no posts matched your criteria.

    To see what I mean, check my website: http://www.fireworkszone.com. You can see the error messages at the bottom of the home page.

    From the error message it seems I am out of the loop?

  2. Austin Matzko
    Member
    Posted 7 years ago #

    Those lines in locale.php use the global variable $month to return for example "January" for $month[01]. Probably something in your custom PHP "tuts_en.php" that you're including, also uses a scalar variable named $month, hence the error message.

  3. fireworkszone
    Member
    Posted 7 years ago #

    Great filosofo I removed my old calendar and I can see my posts now

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags