WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. voilamedia
    Member
    Posted 4 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
    http://wordpress.pastebin.com/NtFgwmTn

    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.

    http://wordpress.pastebin.com/FzSg20Qv

    I get a parse error

    parse error in line 6 unexpected =

    Can you help How might I fix it?

    thanks

  2. alchymyth
    Forum Moderator
    Posted 4 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