Posted: May 20, 2014 at 12:22 pm
|
Is it possible to create a hyperlink to events with the same keywords and/or same title? I’ve created an advertisement for a class that we offer. This class is available throughout the year. I cannot use categories because it is part of larger category already. I would like the advertisement to link to all the available dates for that class. |
Hello, Couldn’t you create a new category and then add these events to that additional category? From there you could add this category shortcode to a page or post and use this new link for your advertisement. — |
|
|
Hey Lorenzo, thanks for the response. As per one of my earlier questions, if we were able to hide categories, this would be a great solution. We have 4 main categories that are displayed on the front page. Right now, if I add a category, it also displays on the front page – which I don’t want. I thought the work around would be to search specific keywords to display all the available dates for that specific class. Is this possible? |
Hello, Can you share a link to what you have so far on the front end? I have some ideas but I’m not sure what version you are currently running. — |
|
|
Thanks again for your quick reply. I am using version 3.1.36.5.P The website is for a client and (my apologies) I am not at liberty to share the link (yet). |
EE3 posts are not stored as custom post types so I don’t think searching for similar keywords through the WordPress search will work. Could you send a link to the site or a screenshot of the front page so I can see the categories? support [at] eventespresso.com — |
|
|
Hi Lorenzo, Here is a link to the screenshot. Above the calendar I have the categories listed. They are also available as a dropdown. |
|
Hi Lorenzo, Sorry, didn’t see the email address. just sent you an email. Thanks |
I didn’t see a screenshot in your prior reply. Was it emailed here? support [at] eventespresso.com — |
|
|
Hi Lorenzo, did you get my email? |
Hello, I did receive the email. We can hide those categories using CSS. Once that is done, your original idea should work: https://eventespresso.com/topic/link-to-events-with-specific-keywords/#post-97969 — |
|
|
Can I be selective in hiding categories? I don’t want to hide the ones that are already there – just the new ones. |
Any categories can be hidden, new or old but they’ll need to be on that page so we can see the CSS id to target with display:none. — |
|
|
Excellent. It works on the firs row of categories. However, it does not work on the drop down. Can display:none be applied to a drop down value? |
|
Hi, It’s really not easy to hide a dropdown option with CSS. JavaScript would be a better alternative. Something like this http://formidablepro.com/help-desk/quick-tip-using-jquery-to-hide-options-in-a-select/ |
|
Hi Dean, Thanks for this suggestion. I’m not sure what I’m doing wrong. This is the code snippet the link recommends:
I’m not sure what #field_25 represents. Is it the form or select name – or neither of these? Any ideas? |
|
Hi, The link was purely an example, and would need to be modified to suit, for example #field_25 doesn’t exist in relation to Event Espresso. Try something like this <script type=”text/javascript”> jQuery('#ee-category-submit').children('option[value="cat004"]').css('display','none'); </script> |
|
That above snippet will remove the Power Workshop menu item |
|
Hi Dean, sorry, I wasn’t clear in my question – but you did answer it. I realized the code was an example, I wasn’t sure what to replace #field_25 with. You’re recommending ee-category-submit. I tried this and.. it’s not working 🙁 Any other ideas? I’m including it as code on the calendar page. Is this the right place for it? |
|
BTW – I appreciate all of your help. I realize that some of my questions are outside the scope of EE (i.e. javascript codes). That you guys are willing to provide support in the way is very much appreciated! |
Hi DM, Unless you’re using a plugin that changes the WordPress editor so it allows Javascript input, adding JavaScript to the page will not work. There are a number of ways to inject JavaScript onto a WP page, and there are a few ideas you can try here, here, or you could try this plugin. |
|
|
Hi Guys, Unfortunately I have not been able to get any of these solutions to work. I’ve placed the script in the header, footer , through a plugin, and with variations of the id. No luck. Any ideas as to why? |
|
Any ideas for a possible solution? I’ve tried a number of scripts including those that use .hide .remove .css. Nothing seems to work. |
|
Because the calendar data loads in an ajax call after the WP page loads, your script that you are adding may be running before the elements are there to set the css on. Try adding it as part of the ajax post-success script. In plugins/espresso-calendar/scripts/espresso_calendar.js, add it after line 114: success: function( response ) { my_javascript_function(); // because FullCalendar won't wait for images to load fully before positioning events in the table grid... |
|
Thanks Sidney. this also did not work. I have tried numerous javascript variations including i.e. tried setting getElementById and value, tried hiding, and removing the string, tried disabling the attribute, running out of options. |
|
I tested this on the twentytwelve theme so your mileage may vary (this + twentyfourteen theme = nightmare), but I just added a function in the themes functions.php function dean() { ?> <script type="text/javascript"> jQuery('#ee-category-submit').children('option[value="red-1398953592"]').css('display','none'); </script> <?php } add_action('wp_footer', 'dean', 100); |
|
Dean thanks for the valiant effort. There must be something in my theme or one of my hacks that is stopping this from working. I am not a coder but can piece stuff together. Maybe, I’m missing something in your example… Are you simply posting that script in the functions file (my value would differ which I already accounted for)? |
|
Hi, Yes precisely, I just added it to the functions.php and the value would be the dropdown items value (you may need to inspect the element to clarify that). It could be something different with your site versus my test sites that is interfering. You may need to contact as web developer to gain further assistance with that though as we can’t really start modifying an individual setup, sorry about that. |
The support post ‘link to events with specific keywords’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.