I have been working on this Calendar system for many days, and I have only just realised that the Events do not show up on the general Search bar on the website. Is it possible to fix that so that people searching will find Events?
I have also realised that the Keywords for the Events do not appear as Tags on the site. So when people click on tags in the Tag Cloud, to see all the posts with a particular key word, they will not see the Events.
These both seem hugely important for people using the site, and for the visibility of the Events on Google. Is it possible to make them work?
The events by default are not excluded from the general search. Does your search include all post types? The events are using custom post type "stec_event".
However, the keywords are working only for in-calendar search only and unfortunately I don't see how it can be done in the current version 3.x.
Search query - solved. Thank you. As you say, it is an issue of what types of posts the search bar is set to search for. In case others have the same question, this is the code snippet I have used, below, inserting 'stec_event' as a third post type.
Tags query - Is it possible to add another field for Tags, so they can be picked up in the same way as other posts?
Just to add - this code to include STEC Events in the results of general searches on the front end of the website needs to be set to "Only run on site front end". (That is easy using the Code Snippets plugin). Otherwise it stops the media search working at the back end.
The code you provided (below) still works well - to include stec events in a search query. Thank you.
However, I realise the search results include unpublished events, whereas they only include published posts. So I want to ask - is there a way to modify the code so that the results include only published stec events?
Hi Zhivko
I have been working on this Calendar system for many days, and I have only just realised that the Events do not show up on the general Search bar on the website. Is it possible to fix that so that people searching will find Events?
I have also realised that the Keywords for the Events do not appear as Tags on the site. So when people click on tags in the Tag Cloud, to see all the posts with a particular key word, they will not see the Events.
These both seem hugely important for people using the site, and for the visibility of the Events on Google. Is it possible to make them work?
Hi,
The events by default are not excluded from the general search. Does your search include all post types? The events are using custom post type "stec_event".
However, the keywords are working only for in-calendar search only and unfortunately I don't see how it can be done in the current version 3.x.
Stachethemes Developer
Search query - solved. Thank you. As you say, it is an issue of what types of posts the search bar is set to search for. In case others have the same question, this is the code snippet I have used, below, inserting 'stec_event' as a third post type.
Tags query - Is it possible to add another field for Tags, so they can be picked up in the same way as other posts?
Just to add - this code to include STEC Events in the results of general searches on the front end of the website needs to be set to "Only run on site front end". (That is easy using the Code Snippets plugin). Otherwise it stops the media search working at the back end.
Hi Zhivko
The code you provided (below) still works well - to include stec events in a search query. Thank you.
However, I realise the search results include unpublished events, whereas they only include published posts. So I want to ask - is there a way to modify the code so that the results include only published stec events?
Thank you and best wishes
You can try this one:
Stachethemes Developer
It seems to work...!
This could be useful in the next update, because I'm sure most sites would want to include published events in the search.
Thank you and best wishes
Simon