Home › Forums › Calendar Products › Events Calendar PRO › events URL slag empty
- This topic has 8 replies, 2 voices, and was last updated 12 years, 3 months ago by
Barry.
-
AuthorPosts
-
December 15, 2013 at 8:49 am #81787
erictondelli
ParticipantHi,
i try to find answer between tutorial and forum, but no success.
My question is (i have Event Calendar base version for now):
why i can’t let empty the field setting Slag url events to see events and bar search in homepage?
I try to set also /, but no way.How could i obtain to view plugin filter bar and events list in homepage?
For now i have to set an url different from hp, for example:
http://test.seratereggiane.it/eventi/but it isn’t what i want, i want this page in hp.
thx to all
regards
LucaDecember 16, 2013 at 1:45 pm #81966Barry
MemberHi Luca, thanks for getting in touch.
My question is (i have Event Calendar base version for now):
why i can’t let empty the field setting Slag url events to see events and bar search in homepage?I’m not entirely sure what you mean, but WordPress will not allow the creation of any posts – including events – if they do not have a slug. If one wasn’t specified, the system will automatically generate it.
How could i obtain to view plugin filter bar and events list in homepage?
It’s a popular request (to add events or event views to the homepage) and we hope to facilitate this in a future release. Right now though we’d regard this as an advanced customization and not one we can offer too much help with, unfortunately.
If you are familiar with coding – and coding for WordPress – you could review our technical docs and functions like tribe_get_view() in particular and think about building what you need that way. However, there are quite a lot of things you would need to take care of to pull this off – including enqueuing the correct scripts and styles.
Alternatively, you might embed a suitable widget (calendar or list widgets) in a homepage-specific sidebar and style and customize it to cover more space and include more information. Our Themer’s Guide is a good starting point if this approach is of interest:
Themer’s Guide for The Events Calendar
Good luck!
December 17, 2013 at 12:05 am #82034erictondelli
ParticipantHi Barry,
unfortunanly i am a good php dev, but no much exp with wp coding hook and filter 🙁
So now i think is the moment to grow up my know how with this.My first question was ambiguos due to my bad english: we want in hp list events view, the same page at /events/.
If i understand right, i could obtain this only create a new template and use tribe_get_view(), right? (or with sidebar widget)
I read about https://theeventscalendar.com/queries-and-pagination/ and i tried it, but i had some problem with “enqueuing the correct scripts and styles.”Do you have some tutorials or existing examples that show how to do it or i am to create it?
December 17, 2013 at 2:00 am #82041erictondelli
ParticipantHi Barry,
i’ve done! Is not more flexible but it works 🙂
Now please help me with the query:
$upcoming = new WP_Query();
$upcoming->query(array(
‘post_type’ => ‘tribe_events’,
‘eventDisplay’ => ‘past’,
‘posts_per_page’ => 10,
‘paged’ => $paged)
);Could you send me a link or explain how tribe filter events works with WP_Query and which param/options i could use?
thx very much!
LucaDecember 17, 2013 at 6:32 am #82056Barry
MemberIt’s often better to use tribe_get_events() in this sort of scenario (than working directly with WP_Query) though it does depend on what you are trying to accomplish.
Please also share code by linking to a service like Pastebin or Gist, otherwise the forum is, unfortunately, likely to strip out pieces of code.
Could you send me a link or explain how tribe filter events works with WP_Query and which param/options i could use?
I’m not sure that we have a consolidated resource that explains how The Events Calendar / Events Calendar PRO interacts with WP_Query, however a lot of information is spread out through the following:
* Themer’s Guide for The Events Calendar
* The Events Calendar: Tutorials
* Technical DocumentationIf you can highlight what you want to do we might be able to give you a push in the right direction, but often it is a matter of spending some time figuring things out by trial and error.
December 17, 2013 at 7:43 am #82071erictondelli
ParticipantHi Barry,
i think we are near to find the right script!I see this:
$events = tribe_get_events( array(
‘eventDisplay’ => ‘custom’,
‘start_date’ => $today,
‘end_date’ => $tomorrow
) );Now, i want to get events in a date range, for example from 20 Dec to 25 Dec.
How have i to set the query? (is possible set this kind of query or i have to retrieve all events and then check their start_date?)
What is the difference between from start_date and EventStartDate?December 17, 2013 at 7:45 am #82072erictondelli
Participant*i want to get events in a date range, for example from 20 Dec to 25 Dec
where event’s start_date(EventStartDate) is between 20 Dec and 25 DecDecember 17, 2013 at 3:18 pm #82379Barry
MemberThat looks like it should do the trick Eric – so long as you are using a date format like yyyy-mm-dd and increment the end date parameter so it is one day ahead of your desired end date.
January 9, 2014 at 9:09 pm #89890Barry
MemberIt’s been a while without any follow-up so I’m going to assume we’re all good and will close this thread. Of course if you do still require further support please don’t hesitate to create a new thread or threads as needed. Thanks!
-
AuthorPosts
- The topic ‘events URL slag empty’ is closed to new replies.
