WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] I want to show events from only 1 category on the Events Page (22 posts)

  1. ptaylor1001
    Member
    Posted 1 year ago #

    The website is a club website and so the events page (created by EM and managed via Settings) needs to display only those events that are organised by the club.

    The website also displays events organised by 3rd party organisation on a different page (this bit has been done).

    In the Event Manager Settings I have tried using {has_category_4} but this did not appear to work.

    I tried {has_category_4}<tr>......</tr>{/has_category} and <tr>{has_category_4}...{/has_category}</tr>.

    Any help in restricting the categories to display on the Events Page will be greatly appreciated.

    Thanks

    http://wordpress.org/extend/plugins/events-manager/

  2. philipjohn
    Member
    Posted 1 year ago #

    Hiya,

    The best way would probably be to use the shortcode, like so;
    [events_list category="4"]

    Cheers,
    Phil

  3. ptaylor1001
    Member
    Posted 1 year ago #

    Thanks Phil

    I just tried that and it seems to get ignored.

    Cheers

    Phil

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    are you using the right number? you need to replace 4 with either your category ID, or the slug e.g."music"

  5. ptaylor1001
    Member
    Posted 1 year ago #

    Thanks Marcus,

    Yes, the number is correct and I've tested the code on another page and apart from a couple of minor formatting issues it works there.

    http://www.irishclub.lu/test-events

    Just doesn't seem to work on the page created by EM (Club Events).

    Cheers

    Phil

  6. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Could you paste the snippet you're using for your Club Events page? Thanks.

  7. RuthNovo
    Member
    Posted 1 year ago #

    I think I am attempting to do the same thing. I have four categories of events. I would like events for each category to print on separate pages. Can you get me started in the right direction. I am using the free version of EM via wordpress. Thank you!

  8. ptaylor1001
    Member
    Posted 1 year ago #

    @RuthNovo

    Here is the code that I used on the test page.

    <table cellpadding="0" cellspacing="0" class="events-table" >
        <thead>
            <tr>
    			<th class="event-time" width="110">Date/Time</th>
    <th width="102"></th>
    			<th class="event-description" width="*">Event</th>
    		</tr>
       	</thead>
        <tbody>
    [events_list category="4"]<tr>
    			<td>
                    #_EVENTDATES<br/>
                    #_EVENTTIMES
                </td>
    <td>#_EVENTIMAGE</td>
                <td> #_EVENTLINK
                    {has_location}<br/><i>#_LOCATIONNAME, #_LOCATIONTOWN #_LOCATIONSTATE</i>{/has_location}
                </td>
            </tr>[/events_list]
    </tbody></table>

    The important bit is the [events_list category="x"]..[/events_list] where x is the category ID.

    @caimin_nwl Currently that is provided by the EM settings and is the code provided by them. I have tried all manner of ways to try and filter to one category (category ID 4) but none have worked.

    I have a similar issue when I try to use EM placeholders and shortcodes in text widgets, they don't work.

  9. angelo
    NetWebLogic Support
    Posted 1 year ago #

    I tried the above shortcode and seems to be working? can you confirm that 4 is = Irish Club

    about placeholders and shortcodes in text widgets, try something similar using links

    http://www.wprecipes.com/how-to-add-shortcodes-in-sidebar-widgets
    http://wordpress.org/plugins/shortcodes-in-sidebar-widgets/

  10. RuthNovo
    Member
    Posted 1 year ago #

    I used ths code, selected the appropriate category ID and it worked fine. I would like to customized the format by deleting the event date and event time column. As luck would have I am having trouble getting that done.

  11. ptaylor1001
    Member
    Posted 1 year ago #

    To remove the Dates/Times column it should work if you just delete the <th> for the Date/Times and then the <td> that contains the placeholders for the dates and times.

  12. RuthNovo
    Member
    Posted 1 year ago #

    I tried that but then the event image becomes larger.

  13. RuthNovo
    Member
    Posted 1 year ago #

  14. RuthNovo
    Member
    Posted 1 year ago #

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <table cellpadding="0" cellspacing="0" class="events-table" >
        <thead>
            <tr>
    			<th class="event-time" width="110">Date/Time</th>
    <th width="102"></th>
    			<th class="event-description" width="*">Event</th>
    		</tr>
       	</thead>
        <tbody>
    [events_list category="8"]<tr>
    			<td>
                    #_EVENTDATES
                    #_EVENTTIMES
                </td>
    <td>#_EVENTIMAGE</td>
                <td> #_EVENTLINK
                    {has_location}<i>#_LOCATIONNAME, #_LOCATIONTOWN #_LOCATIONSTATE</i>{/has_location}
                </td>
            </tr>[/events_list]
    </tbody></table>
  15. RuthNovo
    Member
    Posted 1 year ago #

    When I delete <th> and <td> for event date and event time , thief event image becomes larger. Any thoughts? Thank you.

  16. RuthNovo
    Member
    Posted 1 year ago #

    And one more Question.. How can I delete all the extra lines at the top of the table? Thx

  17. ptaylor1001
    Member
    Posted 1 year ago #

    The only thing that I can think of is to make the featured image a thumbnail.

    The extra lines are probably from the CSS file - I am no expert.

    @angelo_nwl I tried both the plugin and the code for the functions.php and neither worked - see

    http://thenetwork.lu.previewyoursites.com

    and scroll down.

  18. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    @ptaylor1001

    Just doesn't seem to work on the page created by EM (Club Events).

    I think that's your problem, by default EM overrides that page entirely and displays a list of all events.

    You can either add that HTML above/below CONTENTS in that page, but then you'll get two lists. If you want to modify the default events list, then you would need to copy the template:

    events-manager/templates/templates/events-list.php

    to

    yourtheme/templates/events-list.php

    and modify the $args array to include

    $args['category'] = 4;

  19. RuthNovo
    Member
    Posted 1 year ago #

    http://www.funatoakrun.com/quilt-camps-2013-3/get-away-weekend-i/

    Is there any way to eliminate he extra lines I get before the events table prints? How could I change the CSS to fix this? Hanks for your help

  20. ptaylor1001
    Member
    Posted 1 year ago #

    @Marcus. Many thanks, the solution works but with 1 modification - events-list.php should be copied to

    yourthemefolder/plugins/events-manager/templates/

    If the directories do not exist then you need to create them.

    Now for the Widgets issue.

  21. RuthNovo
    Member
    Posted 1 year ago #

    Okay..I found the file..not sure about where I should copy it to and how to create a directory, but .I will give it a try. Please permit me to ask one more question....what if is wanted to expand this concept so that I have one separate event page for each of four different categories? Thx

  22. ptaylor1001
    Member
    Posted 1 year ago #

    Widgets issue sorted - user error.

    @RuthNovo You would the same code on each page but change the event category id to the appropriate one for each page. For the CSS you are looking for a file that ends in .css. It will probably be called something like "styles.css". You will need to know what you are doing here or your site could end up looking like a dog's breakfast.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic