Commit abba5d0b authored by Benthe Kuijpers's avatar Benthe Kuijpers
Browse files

disable archive for events, and also remove button to all events

parent 1d75e03a
......@@ -32,7 +32,7 @@ function mio_custom_post_types() {
'view_item' => __( 'View event' )
),
'hierarchical' => true,
'has_archive' => true,
'has_archive' => false,
'supports' => array( 'title', 'editor', 'author' )
);
register_post_type( 'events', $args );
......
......@@ -24,10 +24,10 @@
<?php the_content(); ?>
<div class="single__button">
<?php if (is_singular('events')) { ?>
<a href="<?php echo get_post_type_archive_link('events'); ?>" class="btn btn--back"><?php _e('see all events', 'makeitopen'); ?></a>
<?php } else { ?>
<?php if (is_singular('post')) { ?>
<a href="<?php echo get_permalink(get_option('page_for_posts')); ?>" class="btn btn--back"><?php _e('see all news', 'makeitopen'); ?></a>
<?php } else { ?>
<?php } ?>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment