WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
How to use query: &cat=&eventDisplay=upcoming ? (2 posts)

  1. alvarix
    Member
    Posted 3 years ago #

    I dont understand how this is to be used.
    I tried to enter it as variables in a query, :

    query_posts('&cat=&eventDisplay=upcoming');if(get_events()) {
    while (have_posts()) {
    have_posts();

    but it is returning errors.

    Notice: Undefined index: viewOption in /Users/alvar/Sites/DS/forge/trunk/wp/wp-content/plugins/the-events-calendar/template-tags.php on line 13 Notice: Undefined index: displayEventsOnHomepage in /Users/alvar/Sites/DS/forge/trunk/wp/wp-content/plugins/the-events-calendar/template-tags.php on line 13 
    
    Notice: Undefined index: viewOption in /Users/alvar/Sites/DS/forge/trunk/wp/wp-content/plugins/the-events-calendar/template-tags.php on line 13

    Also tried replacing have_posts() with get_events().
    Can a more detailed example be provided on how to use these variables?

    Thanks,
    alvar

  2. alvarix
    Member
    Posted 3 years ago #

    I found another post that helped me to clarify this.

    &cat=nn&eventDisplay=upcoming
    where nn is the category number of the Events category in your WrodPress blog. That may be obvious to veterans in using "the loop" to get stuff from WordPress

    I agree with mgreis, I thought it was some special query construct than realizing I had to enter the cat id.
    Anyway, to limit the amount of posts I could not figure out how to use get_events(), so I ended up with just using a for loop with a counter in place of while(have_posts()) loop.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic