WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Event page shows only text (9 posts)

  1. Anika
    Member
    Posted 1 year ago #

    Hi,
    probably I am doing something wrong, but event page I have just created shows only text. There is no venue, no map, no image set up as featured. Could anyone help me please.
    regards,
    Anita

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

  2. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Anita,

    No you're not doing anything wrong, that's just the default templates. I am considering adding more stuff in as default, **but** it was always expected that users will want to edit the templates to show the information they want and where (see this page: http://wp-event-organiser.com/documentation/editing-the-templates/).

    The plug-in provides plenty of functions (see the documentation) for displaying things like maps, event details etc. Stuff like the thumbnail can be displayed via native WordPress functions (e.g. [get_the_post_thumbnail()](http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail).

    If you have any questions on how to do something, feel free to post another question on the forums :)

  3. Anika
    Member
    Posted 1 year ago #

    Hi Stephen,
    Thank you for your answer. Finaly I managed how to add description, start, finish time and venue details:)

    Have to admit it is very good plugin, but for somebody who has no php knowledge quite difficult to edit.

    One suggestion. During adding venu maybe it will be worth to create separate field for town/city. It can give possibility to sort events by location as well.

    Thank you for your time!
    Anita

  4. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Anita

    A city field is planned for 1.7 :).

    > but for somebody who has no php knowledge quite difficult to edit.

    Unfortunately so - my intention is to improve the default templates so that for the fast majority of people they won't need to. For those that do need to (and some will because of theme conflicts) there's not much that can be done as I want users to have complete control over how events appear :).

  5. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    I've started a ticket for this, because I think both default templates and template handling can be improved to reduce the need for creating your own template files: https://github.com/stephenh1988/Event-Organiser/issues/14

  6. Anika
    Member
    Posted 1 year ago #

    Hi Stephen,
    Thank you very much for all your supprt:)
    I have another problem, I used the piece of code you suggested to use to another user.
    My problem is that when I add more than one venue to Venues all of them are displayed on single-event page. It does not matter that I selected just one venue.

    I have used this code:

    <?php
    					$venues = eo_get_venues();
    					if( $venues ):
    						foreach( $venues as $venue ):
    
    							//IMPORTANT: Make sure venue ID is an integer (If its a string, it will be interpreted as a slug).
    							$venue_id = (int) $venue->term_id;
    
    							printf('<div id="venue-%d">', $venue_id );
    
    								/* Display venue name and address */
    								echo '<header class="entry-header"> <h2>Get directions</h2>';
    									printf(' %s ', eo_get_venue_name($venue_id) );
    
    									$address = array_filter(eo_get_venue_address($venue_id));
    									echo implode(', ',$address);
    								echo '</header>';
    
    								/* Display venue description & map */
    								echo '<div class="entry-content">';
    									echo eo_get_venue_description($venue_id);
    									echo eo_get_venue_map($venue_id);
    
    									echo'</div>';
    							echo'</div>';
    
    						endforeach;
    					endif;	
    
    				?>

    Can you please help me?
    regards,
    Anita

  7. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Anita

    The code above was designed to list all venues and information about them. Try the following (inside the loop).

    //IMPORTANT: Make sure venue ID is an integer (If its a string, it will be interpreted as a slug).
         $venue_id = eo_get_venue()
    
         printf('<div id="venue-%d">', $venue_id );
    
              /* Display venue name and address */
              echo '<header class="entry-header">
                   <h2>The Venue</h2>';
                   printf(' %s ', eo_get_venue_name($venue_id) );
                   $address = array_filter(eo_get_venue_address($venue_id));
                   echo implode(', ',$address);
              echo '</header>';
    
              /* Display venue description & map */
              echo '<div class="entry-content">';
                   echo eo_get_venue_description($venue_id);
                   echo eo_get_venue_map($venue_id);
              echo'</div>';
    
         echo'</div>';

    Outside the loop you can past the event (post) ID to the function eo_get_venue() (see this page).

    Hope that helps :)

  8. Anika
    Member
    Posted 1 year ago #

    Hi Stephen,
    Step by step and I resolved it.
    Thanks a lot!

    Anita

  9. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    You welcome :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.