Home › Forums › Calendar Products › Events Calendar PRO › double read-more tags
- This topic has 6 replies, 2 voices, and was last updated 9 years, 8 months ago by Josh.
-
AuthorPosts
-
August 26, 2014 at 2:01 pm #702186OwenParticipant
Hi,
My theme is adding a “read more” on event page listings, which is then duplicated by the tribe events theme… can i add an exception to my child theme functions file to get rid of this duplication? I like the tribe events “find out more” better.
here’s what i tried, hasn’t worked yet:
function excerpt_read_more_link($output) {
global $post;
if ($post->post_type != ‘tribe_events’)
{
$output .= ”;
}
return $output;
}
add_filter(‘the_excerpt’, ‘excerpt_read_more_link’);August 26, 2014 at 6:39 pm #702538JoshParticipantHey Owen,
Thanks for reaching out to us.
Having a “read more” link at the end of an excerpt isn’t default WordPress functionality and sounds like something that is being added by your theme.
Unfortunately, I have no way of knowing how your theme is adding this element although your approach of filtering the_excerpt seems like the right starting point.
This may not work, but I did make a couple of minor revisions to your code example that may help https://gist.github.com/BeardedGinger/ae8ca5398cdfcb7ec011.
If that doesn’t work, I can help you in removing the “Find out more” link being added by The Events Calendar plugin.
I’m sorry I wasn’t able to give you a more direct solution. Let me know if there is anything else I can do to help.
Thanks!
August 27, 2014 at 3:22 pm #704891OwenParticipantHmm… still not working. You’re right though… I didn’t realize it wasn’t default WP functionality… so I will likely ask for support from theme developer.
Until then, I’d like to take you up on your offer to remove the find out more link! Yes please! 🙂
August 27, 2014 at 5:58 pm #705100JoshParticipantHey Owen,
Sure thing!
There are 2 approaches you can take to remove the “Find out more” from the events list.
- You could follow the instructions in the Themer’s Guide and copy the “views > list > single-event.php” file into your theme and remove this link from the bottom of the file :
<a href="<?php echo tribe_get_event_link() ?>" rel="bookmark"><?php _e( 'Find out more', 'tribe-events-calendar' ) ?> »</a>
- A much simpler approach would be to hide it using CSS. Within your theme’s CSS, you can include the following, “.tribe-events-read-more { display: none; } ” and this will prevent it from displaying on your site.
Let me know if this helps.
Thanks!
August 27, 2014 at 10:17 pm #705475OwenParticipantThat got it… and now I can spend as much time as I need to figuring out the THEME side of it. Thanks!
August 27, 2014 at 10:32 pm #705508OwenParticipantDoes this help? I’m just trying to find the right code to hook into…
https://gist.github.com/markmctaffery/038319163d536e331807You can see the result page in my “shows” category events here:
http://www.kinkonauts.com/events/category/all-shows/August 28, 2014 at 7:42 am #706554JoshParticipantHey Owen,
I’m happy to have been able to help!
We don’t do any specific support for customizations of themes but to point you in the right direction on removing the “read more” from the theme, it looks like the developer is using a “function_exists” check before each of those functions. This means you should be able to create the function with the same name in your theme (or a plugin) that has that string returning empty like your previous code snippet.
I’ll go ahead and close this ticket but if you have any further questions please don’t hesitate to open another ticket.
Thanks!
- You could follow the instructions in the Themer’s Guide and copy the “views > list > single-event.php” file into your theme and remove this link from the bottom of the file :
-
AuthorPosts
- The topic ‘double read-more tags’ is closed to new replies.