Plugin Contributor
Roch
(@rochesterj)
Hi!
Would you mind sending us a screenshot of your wp-admin section for one of these events? In specific the part where you set the time for the event (but if you could send the whole page that would be even better)
Kind Regards,
-Roch
I had a similar issue, even after flushing permalinks. For me it only occurs when there are multiple events on one day in a calendar view. Clicking on the date in the calendar takes you through to a page listing the events. If the events are in the future (i.e. scheduled) the hyperlink for each event on this page is in the format:
http://<domain>/?post_type=sp_event&p=<post id>
This link works when I am logged in as admin, but gives the ‘Oops! That page can’t be found’ error when not logged in.
In the calendar list view, the link to the same event is in the format:
http://<domain>/event/<post id>/
This link works whether logged in or not.
I looked in more detail at the content-page.php from the rookie theme and this uses get_permalink() to generate the link, whilst in the event-list.php from the SportsPress plugin uses get_post_permalink( $event->ID, false, true).
So I changed content-page.php for the rookie theme to the following:
<!-- If it is not a page - use get_post_permalink with sample option set to true -->
<?php if ( ! is_single() && ! is_page()) { ?>
<a href="<?php echo esc_url(get_post_permalink(0,false,true)); ?>">
<?php } ?>
<header class="entry-header">
<?php if ( has_post_thumbnail() ) { ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail( 'large' ); ?>
</div>
<?php } ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php if ( ! is_single() && ! is_page()) { ?></a><?php } ?>
Now this seems to return the correctly formatted permalink.
Regards
John
Hi John
this looks exactly like the issue that I have on my site and which I posted about earlier in the week 404 errors navigating from Calendar event list . Is this an change to the existing code block in content-page.php (below) or an additional code block within it? Would it be possible to share the entire code segment to be sure of what needs to be amended.
Many thanks
John
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<?php if ( ! is_single() ) { ?>“><?php } ?>
<header class=”entry-header”>
<?php if ( has_post_thumbnail() ) { ?>
<div class=”entry-thumbnail”>
<?php the_post_thumbnail( ‘large’ ); ?>
</div>
<?php } ?>
<?php the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ ); ?>
</header><!– .entry-header –>
<?php if ( ! is_single() ) { ?><?php } ?>
<div class=”entry-content”>
<?php the_content(); ?>
<?php
wp_link_pages( array(
‘before’ => ‘<div class=”page-links”>’ . __( ‘Pages:’, ‘rookie’ ),
‘after’ => ‘</div>’,
) );
?>
</div><!– .entry-content –>
</article><!– #post-## –>
hi, @vrissanen your version is pro or free,
Regards,