Hallo Leute,
ich habe eine Frage zu folgendem Plugin (Event Organiser). Hoffentlich kennt das jemand und kann mir dort einen Tipp geben.
An alle Leute, die das Plugin kennen:
Ich habe das Plugin erfolgreich installiert und entsprechend konfiguriert. Es laufen zwei unterschiedliche Kategorien über das Plugin (Veranstaltungen und Presse). Nun möchte ich jedoch was zusätzliches einfügen und zwar eine Verlinkung auf die Übersicht aller Veranstaltungen (sowohl bei der Kategorie Veranstaltungen als auch bei der Kategorie Presse).
Der Ansatz ist mir bereits bewusst, dass ich eine if-Anweisung hinzufügen soll in der entsprechenden PHP-Datei. Leider finde weiß ich nicht genau, was ich da ansprechen soll, um zwischen den Kategorien zu unterscheiden (bzw. ich komme nicht drauf, welche variable ich nehmen soll und ob das möglich ist)
mein Grundgedanke war folgendermaßen
if(kategorie == 'Veranstaltungen')
{
dann Verlinkung zur Übersicht auf Veranstaltungen
}
else
{
Verlinkung zur Übersicht auf Presse
}
Hoffentlich war das einigermaßen verständlich ausgedrückt. Ich poste hier noch mal den Link von der Seite. Dort kann man sich das Problem nochmal vor Augen Führen
http://wissenschaftspark.eu.212-51-16-11.service.addix.net/wordpress/
ich poste noch mal deb Quellcode aus der PHP-Datei:
<?php
/**
* The template is used for displaying a single event details.
*
* You can use this to edit how the details re displayed on your site. (see notice below).
*
* Or you can edit the entire single event template by creating a single-event.php template
* in your theme.
*
* For a list of available functions (outputting dates, venue details etc) see http://wp-event-organiser.com/documentation/function-reference/
*
***************** NOTICE: *****************
* Do not make changes to this file. Any changes made to this file
* will be overwritten if the plug-in is updated.
*
* To overwrite this template with your own, make a copy of it (with the same name)
* in your theme directory. See http://wp-event-organiser.com/documentation/editing-the-templates/ for more information
*
* WordPress will automatically prioritise the template in your theme directory.
***************** NOTICE: *****************
*
* @package Event Organiser (plug-in)
* @since 1.7
*/
?>
<div class="entry-meta eventorganiser-event-meta">
<!-- Choose a different date format depending on whether we want to include time -->
<?php if( eo_is_all_day() ){
$date_format = 'j F Y';
}else{
$date_format = 'j F Y H:i';
} ?>
<hr>
<!-- Event details -->
<h4><?php _e('', 'eventorganiser') ;?></h4>
<!-- Is event recurring or a single event -->
<?php if( eo_reoccurs() ):?>
<!-- Event reoccurs - is there a next occurrence? -->
<?php $next = eo_get_next_occurrence($date_format);?>
<?php if($next): ?>
<!-- If the event is occurring again in the future, display the date -->
<?php printf('<p>'.__('This event is running from %1$s until %2$s. It is next occurring on %3$s','eventorganiser').'.</p>', eo_get_schedule_start('j F Y'), eo_get_schedule_last('j F Y'), $next);?>
<?php else: ?>
<!-- Otherwise the event has finished (no more occurrences) -->
<?php printf('<p>'.__('This event finished on %s','eventorganiser').'.</p>', eo_get_schedule_last('d F Y',''));?>
<?php endif; ?>
<?php endif; ?>
<ul id="eo-event-meta" style="float:left;width:40%">
<?php if( !eo_reoccurs() ){ ?>
<!-- Single event -->
<li><strong><?php _e('', 'eventorganiser') ;?></strong> <?php eo_the_start($date_format); ?> </li>
<?php
} ?>
<?php if( eo_get_venue() ){ ?>
<li><strong><?php _e('Venue','eventorganiser'); ?>:</strong> <a href="<?php eo_venue_link(); ?>"> <?php eo_venue_name(); ?></a></li>
<?php } ?>
<!--<?php if( get_the_terms(get_the_ID(),'event-category') ){ ?>
<li><strong><?php _e('Categories','eventorganiser'); ?>:</strong> <?php echo get_the_term_list( get_the_ID(),'event-category', '', ', ', '' ); ?></li>
<?php } ?>-->
<!-- hier soll die Anweisungen hin und der Link zur Übersicht von den Veranstaltungen befindet sich unterhalb des Kommentars-->
<?php
echo '<a href="http://wissenschaftspark.eu.212-51-16-11.service.addix.net/wordpress/veranstaltungen" >zurück zur Übersicht</a>'
?>
<?php if( get_the_terms(get_the_ID(),'event-tag') && !is_wp_error( get_the_terms(get_the_ID(),'event-tag') ) ){ ?>
<li><strong><?php _e('Tags','eventorganiser'); ?>:</strong> <?php echo get_the_term_list( get_the_ID(),'event-tag', '', ', ', '' ); ?></li>
<?php } ?>
<?php if( eo_reoccurs() ){
//Event reoccurs - display dates.
$upcoming = new WP_Query(array(
'post_type'=>'event',
'event_start_after' => 'today',
'posts_per_page' => -1,
'event_series' => get_the_ID(),
'group_events_by'=>'occurrence'//Don't group by series
));
if( $upcoming->have_posts() ): ?>
<li><strong><?php _e('Upcoming Dates','eventorganiser'); ?>:</strong>
<ul id="eo-upcoming-dates">
<?php while( $upcoming->have_posts() ): $upcoming->the_post(); ?>
<li> <?php eo_the_start($date_format) ?></li>
<?php endwhile; ?>
</ul>
</li>
<?php
wp_reset_postdata();
//With the ID 'eo-upcoming-dates', JS will hide all but the next 5 dates, with options to show more.
wp_enqueue_script('eo_front');
?>
<?php endif; ?>
<?php } ?>
</ul>
<!-- Does the event have a venue? -->
<?php if( eo_get_venue() ): ?>
<!-- Display map -->
<div id="test" style="width:45%;float:right;">
<?php echo eo_get_venue_map(eo_get_venue(),array('width'=>'100%')); ?>
</div>
<?php endif; ?>
<div style="clear:both"></div>
<hr>
</div><!-- .entry-meta -->
Alles anzeigen