Forum Replies Created
-
AuthorPosts
-
Marlene HasselParticipant
Thanks!
I got it working now.
Here’s what I ended up with:add_filter( 'tribe_related_posts_args', 'example_exclude_category_from_related_posts' ); function example_exclude_category_from_related_posts( $args ) { if ( ! is_array( $args ) ) { return $args; } //Remove special categories $ej_relaterade=array('15', '31', '35', '37', '39', '41', '42', '43', '44', '47'); $args["tax_query"][0]["terms"] = array_diff($args["tax_query"][0]["terms"],$ej_relaterade); return $args; } //}
I had to remove the outer
if ( class_exists( 'Tribe__Events__Main' ) )
to get the function to do anything. What was that if-statement for?Marlene HasselParticipantIs there a hook that can run a function when putting each event in the photo view?
If so, maybe that could be used to check if the event has a featured image, and if not, echo one?Marlene HasselParticipantThanks!
2 more things:
- I’d like to show the subcategory events in their respective subcategories only, and not in the parent category.
- Would it be possible to give each subcategory a featured image so that they can be displayed in the same way as the events?
August 9, 2016 at 5:12 am in reply to: Remove link before category title and show description #1149362Marlene HasselParticipantThis reply is private.
Marlene HasselParticipantPerfect! That’s just what I needed.
Thanks!Marlene HasselParticipantYes, that works!
One more question:
Is there a function that returns the ID of the current category in the category view?Marlene HasselParticipantYes that works!
So there’s tribe_events_before_html and tribe_events_after_html,
but what about adding something before or after a specific element inside the html? Like the tribe-events-page-title or tribe-events-bar
Are there functions for that as well?Marlene HasselParticipantThis reply is private.
- This reply was modified 7 years, 8 months ago by Marlene Hassel.
Marlene HasselParticipantThis reply is private.
Marlene HasselParticipantNever mind, I figured it out. It works when maintenance mode is disabled.
But now I have a few supplementary questions.
The event title is now included in the facebook post, but with the string “Upcoming Event – ” added before it.
How do I change that?The description below the title in the facebook post is a mess. Is it possible to get just the date, time and excerpt there instead?
The featured image of the event is only included on some of the events. What’s up with that?
Marlene HasselParticipantThis reply is private.
Marlene HasselParticipantI tried adding that code to my functions, but all it did was change the dashboard back to english.
I have found that I can translate some things manually by changing the the-events-calendar-sv_SE.po and compiling a new .mo, but some things just won’t change.
For example, I’m trying to change “Event Category” to “Kategori”.
I can change the word “Event” but not “Category”Marlene HasselParticipantI’m trying to change it to swedish.
The wordpress site is set to swedish, but the ticket thing is in english.I also tried the “Change the wording of any bit of text or string” thing, but that didn’t do anything either.
-
AuthorPosts