Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter clayharris

    (@clayharris)

    Ok, Sorry for that. I’d like to only display one category on the index.php. How do I do that – (I’ve searched, I promise)?

    At the top of your index.php template:

    <?php
    if (empty($_SERVER['QUERY_STRING'])) {
    $cat = 'numberofcategory';
    }

    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>

    Change numberofcategory to the numeric ID of the category you want displayed on the home page.

    excellent – i was just about to give up on the search and post the same question (eventually got the right wording for the search) cheers!

    ah – did as you say and i’m getting

    Fatal error: [] operator not supported for strings in /web/sites/293/opaz/www.hebdenbridgenews.com/wp-blog-header.php on line 469

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘display only one category on index.php’ is closed to new replies.