WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] How to display all Venues created in Plugin on One Page? (7 posts)

  1. zabbyh
    Member
    Posted 1 year ago #

    Hi

    This is what I am wanting to do?

    1.The page should display a list of all venues created in the plugin.
    2. Once you click on the venue, it display the address that you have entered in the venue settings, the google map that was generated for it and anything else that was entered in the content field.

    http://wordpress.org/extend/plugins/event-organiser/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    For (1) Venues are just a taxonomy - and WordPress doesn't provide a taxonomy archive in the sense of listing taxonomy terms, but you can create a custom page which does so.

    A while back I drew up an example of such a page template: https://gist.github.com/3902494

    For (2) do you mean the venue page which (by default) has a map at the top and lists the events? If so you can simply edit the default venue template (move it to your theme first) to include this information, using the functions I mentioned in my reply to your other thread.

  3. zabbyh
    Member
    Posted 1 year ago #

    Hi

    Regarding the plugin, what templates should be in the template folder. In my installation I have:

    archive-event
    single-event
    taxonomy-event-category
    taxonomy-event-tag
    taxonomy-event-venue

    There is no venue-template.php, should it be there?

    @2 - Yes that is what I meant, under the admin screen you set the address and see the google map, but on the event in the widget when you click on it this info is not shown.

  4. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    The following

    archive-event
    single-event
    taxonomy-event-category
    taxonomy-event-tag
    taxonomy-event-venue

    Come with the plug-in by default and can be moved to your theme folder and edited. (see this page)

    venue-template.php

    is the old 'taxonomy-event-venue' and is no longer used.

    You can also create a page template using the gist I linked to. It doesn't come by default, and to use it just create a page selecting it as the page's template.

    Regarding showing venue map and information - you can edit single-event.php (the template used for single event pages) to include this information. (E.g. the functions I mention here).

    Hope that helps!

  5. zabbyh
    Member
    Posted 1 year ago #

    I have used the example you created here: https://gist.github.com/3902494 and created it as a page template.

    The problem now is that it does not abide to the theme layout and takes up the entire page from left to right

    Text & Map is not in line with Theme menu etc...

    Map is Height: 200px width: 100%

    For the plugin to work with my theme, I had to uncheck, What do I do in this situation if I am using the page as a custom template?

    Enable templates:

    For each of the pages, the corresponding template is used. To use your own template simply give it the same name and store in your theme folder. By default, if Event Organiser cannot find a template in your theme directory, it will use its own default template. To prevent this, uncheck this option. WordPress will then decide which template from your theme's folder to use.

  6. zabbyh
    Member
    Posted 1 year ago #

    Thanks for all your help with this, I figured it out after I read you mentioned single.php which is the default template for the theme.

    I just copied these two lines:

    <div id="content" class="col-full">
    <div id="main" class="col-left">

    and replaced over:

    <div id="primary">
    <div id="content" role="main">

    That solved the problem with the layout, now I can play around with it so it looks the way I want it to.

    Thanks again.

  7. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    The gist is just an example, you'll need to modify to fit in with your theme (in general the default page templates may not work with your theme - and so likewise need editing).

    > For the plugin to work with my theme, I had to uncheck, What do I do in this situation if I am using the page as a custom template?

    If you created a page template using the gist, and then created a page and selected it as the page's template then WordPress will use that template for that page regardless of whether you've checked/unchecked that option. The gist examples operates completely outside the Event Organiser, and simply uses the functions it provides.

    Regarding the height/width of the venue map. There is a bug with eo_get_venue_map() in 1.5.7. 'Normally' (and in 1.6 you will be able to) you can pass attributes as a second parameter:

    echo eo_get_venue_map( eo_get_venue(), array('height'=>'50px','width'=>'50px');

    1.6 will be out a few days after WP3.5 is released - which is being released Monday.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.