WordPress.org

Ready to get started?Download WordPress

Forums

Unexpected T_ELSE and pagination issue. (6 posts)

  1. Jay
    Member
    Posted 2 years ago #

    Created a custom page template and I have looked and looked and cannot find my issues.

    1. I am getting a T_else error.
    2. pagination is not working. The previous / next posts links will not even show up.

    Thanks for any help in advance. Here is the code

  2. Jay
    Member
    Posted 2 years ago #

    Syntax fixed. Onward to pagination.

  3. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

  4. Jay
    Member
    Posted 2 years ago #

    Thanks for the links. I reviewed the first and several others before I posted my code, but the second one did the trick. My question though is, I have multiple custom pages with custom queries on each page. In the second link you provided, the custom query $custom_query had to be changed to $wp_query in order for pagination to work. Can you use $wp_query over and over? Or does each custom query have to have its own custom name IE $myCustom_query?

  5. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    you can use $wp_query again and again, particularly if you do this in different templates.

  6. Jay
    Member
    Posted 2 years ago #

    Thanks alchymyth! I really appreciate it. I will give it a whirl.

Topic Closed

This topic has been closed to new replies.

About this Topic