Forum Replies Created
-
AuthorPosts
-
November 16, 2016 at 4:51 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1193586
Ruth
ParticipantI’m not sure I fully understand what you describe.
I’ve found that selecting ANY category OTHER THAN a subcategory of “community” returns the correct results, when making the FIRST selection from the Community Events page. Selecting any of the subcategories of “community” returns “no results” (and triggers the incorrect page template, which then doesn’t go away) when making the FIRST selection. Subsequent selections of ANY category or sub-category return the correct results (with the wrong page template).
All events are allocated to both a parent and a subcategory.
November 15, 2016 at 7:52 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1192926Ruth
ParticipantHi Cliff
Thank you for looking into this. I had to downgrade to version 4.3 before I could get the filter bar to appear in the sidebar.
I still don’t undertand why I’m getting “no results” when I select a category when on the Community Events category archive page.
http://southernharvest.org.au/events/category/community/
It’s the “no results” that is creating the page layout problem. I will follow that up with Avada, but why am I getting “no results” in the first place?
Thanks
KateNovember 9, 2016 at 6:15 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1190078Ruth
ParticipantBefore I try that snippet, I have just updated all the Modern Tribe plugins and now the page layout selection is being ignored entirely. I have tried all the page template options in the settings and they all return the same layout. The filter bar stubbornly appears above the events, when it should be to the side in a vertical layout and ignores the setting to be in the “closed” status.
http://southernharvest.org.au/events/
Things are getting worse, not better.
Kate
November 8, 2016 at 8:39 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1189461Ruth
ParticipantThis reply is private.
November 2, 2016 at 4:04 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1186660Ruth
ParticipantSorry to say, that broke the site. Had to restore my backup functions.php to the child theme.
Kate
October 30, 2016 at 6:05 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1185114Ruth
ParticipantHi Cliff
Sorry for taking so long to respond.
The last dining event has passed, so no, there aren’t currently any events in the dining category. However, I can replicate the behaviour in the video by firstly selecting “cooking” (no results, sidebar template displays), then “markets” (results, sidebar template remains), then “cooking” (results, sidebar template remains) while on the Community Events page.
Selecting “cooking” on the main events page works as expected. No sidebar template appears, even if I select a category with no results (eg. “dining”).
But I seem to have found the origin of the problem. In another thread, I asked for assistance to be able to hide the “community” category and its subcategories from the main events page, so I could essentially create two events pages that didn’t display the same content.
This is the code I was given:
add_action( ‘pre_get_posts’, ‘exclude_events_category’ );
function exclude_events_category( $query ) {if ( is_admin() || !isset( $query->query_vars[‘eventDisplay’] ) || tribe_is_community_my_events_page() ) return $query;
if ( $query->query_vars[‘eventDisplay’] == ‘upcoming’ || $query->query_vars[‘eventDisplay’] == ‘past’ || $query->query_vars[‘post_type’] == Tribe__Events__Main::POSTTYPE && !is_tax(Tribe__Events__Main::TAXONOMY) && empty( $query->query_vars[‘suppress_filters’] ) ) {
$query->set( ‘tax_query’, array(
array(
‘taxonomy’ => Tribe__Events__Main::TAXONOMY,
‘field’ => ‘slug’,
‘terms’ => array(‘community’),
‘operator’ => ‘NOT IN’
)
) );
}return $query;
}
When I remove the code, the Community Events page responds properly to making category selections from the filter bar. No sidebar template appears if there are no results.
I really need to keep the community events page out of the main events page, so they don’t crowd the ticketed workshops that are booked through the website.
Thanks and regards
KateOctober 20, 2016 at 5:35 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1180242Ruth
ParticipantHi Cliff
Community events page: http://southernharvest.org.au/events/category/community/
No result when selecting a subcategory: http://southernharvest.org.au/events/photo/?action=tribe_photo&tribe_paged=1&tribe_event_display=photo&tribe_eventcategory=26
Gets correct result when selecting another subcategory: http://southernharvest.org.au/events/photo/?action=tribe_photo&tribe_paged=1&tribe_event_display=photo&tribe_eventcategory=30&tribe_eventcategory=30
Gets correct result when selecting the previously attempted subcategory: http://southernharvest.org.au/events/photo/?action=tribe_photo&tribe_paged=1&tribe_event_display=photo&tribe_eventcategory=26&tribe_eventcategory=26
Video of each of those steps in order: http://screencast.com/t/QoLsWK2n
Thanks
KateOctober 19, 2016 at 8:33 pm in reply to: Blog sidebar appears when category archive page returns "no results" #1179643Ruth
ParticipantSorry… that was all a long way of saying that when the “community events” page (which is a category archive page using the correct page template) returns “no results”, it switches from the default page template to the blog archive page template. So I can avoid the sidebar appearing by removing the sidebar from the blog archive page template, but I WANT the sidebar to appear on the blog archive page. I do not want the page template to change to the blog archive template if “no results” are found when using the filter bar.
Ruth
ParticipantOK Josh. I very much appreciate the effort you made to find a solution.
I’ve been trying to avoid any customisations that would be overwritten by updates, as the client will be self-sufficient shortly and I need to keep things super simple. I’ll talk to them about a compromise instead.
I do have one more problem that’s arisen since updating to 4.3, but I will start a new thread.
Thanks again.
KateRuth
ParticipantHi Josh. Just wondering if you’ve had any time to look at this and if what you suspect is true. Thanks. Kate
September 20, 2016 at 3:58 pm in reply to: Mods to filter bar not working quite as expected #1166698Ruth
ParticipantHi Josh
Thank you so much for persisting with this. I really appreciate it.
However, when I try to attach/share the export file, I get a message that I can’t upload files of this type ie. XML export file. Can I email it to you separately, perhaps?
Kate
September 15, 2016 at 4:15 pm in reply to: Mods to filter bar not working quite as expected #1164895Ruth
ParticipantHi Josh
Removing those two lines does this:
* pagination on community category archive page now works, but
* the second and subsequent pages of results still return to the main events page, although only events in the community category are displayed.
Kate
September 14, 2016 at 12:21 am in reply to: Mods to filter bar not working quite as expected #1163822Ruth
ParticipantHi Josh
The only difference is in the first snippet (post 1142662), where I changed line 11 of that snippet from this
‘terms’ => array(‘markets’),
to
‘terms’ => array(‘community’),
Out of interest, I changed it back to ‘markets’ and went to the Community Events page (community category archive page) to see if it fixed the pagination problem. It doesn’t.
I also wanted to see if it had an effect on the other problem (selecting a sub-category from the filter bar and getting to results). While the ‘markets’ term was in play, selecting the “dining” sub-category returned events in that category AND ALSO returned the user to the main events page, with only the workshops category and sub-categories available in the filter bar.
Re-entering ‘community’ put me back where I started with the problems I first came to you with. Hope that makes sense.
Could you please advise if this information helps before I start fiddling around with changing the theme etc? The site is live and I’d rather not make drastic changes unless I absolutely have to.
Many thanks
KateSeptember 11, 2016 at 3:18 pm in reply to: Mods to filter bar not working quite as expected #1162612Ruth
ParticipantHi Josh
No, removing that line does not fix the pagination problem. Still only one page of results and clicking “next events” returns “there were no results found”.
Kate
September 7, 2016 at 10:10 pm in reply to: Mods to filter bar not working quite as expected #1161373Ruth
ParticipantHi Josh
Sorry for the slow response. It can take me a while to get back to these things.
Yes, the pagination issue with the community category archive page goes away if I deactivate the filter bar plugin.
Regards,
Kate -
AuthorPosts
