error w/ displaying post from specific category (2 posts)

  1. Voila Media
    Posted 6 years ago #

    On my HP on dev.tekture.com/campsimcha i have a sidebar on the right that displays post from a specific category (news cat ID 5)

    Current sidebar-home-php file

    I want to change it to display posts the exact same way but from the camp blog category (http://dev.tekture.com/campsimcha/category/camp-blog)

    here is my modified code.


    I get a parse error

    parse error in line 6 unexpected =

    Can you help How might I fix it?


  2. Michael
    Forum Moderator
    Posted 6 years ago #

    php variable naming rules:

    PHP Naming Conventions and Rules
    Variable names can contain any combination of letters, numbers and the underscore symbol (_). A variable must begin with either a letter or the underscore symbol and can not contain any blank spaces.

    i.e. $camp-blog_cat_ID is not a valid varaible name; try to rewrite it as $camp_blog_cat_ID

Topic Closed

This topic has been closed to new replies.

About this Topic