Support

Home Forums Event Espresso Premium link to events with specific keywords

link to events with specific keywords

Posted: May 20, 2014 at 12:22 pm

Viewing 27 reply threads


DM Eddy

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.


Lorenzo Orlando Caum

  • Support Staff

May 20, 2014 at 12:32 pm

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.


Lorenzo


DM Eddy

May 20, 2014 at 12:38 pm

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?


Lorenzo Orlando Caum

  • Support Staff

May 20, 2014 at 12:43 pm

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.


Lorenzo


DM Eddy

May 20, 2014 at 12:52 pm

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).


Lorenzo Orlando Caum

  • Support Staff

May 20, 2014 at 1:46 pm

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


Lorenzo


DM Eddy

May 20, 2014 at 1:54 pm

Hi Lorenzo,

Here is a link to the screenshot. Above the calendar I have the categories listed. They are also available as a dropdown.


DM Eddy

May 20, 2014 at 1:58 pm

Hi Lorenzo,

Sorry, didn’t see the email address. just sent you an email.

Thanks


Lorenzo Orlando Caum

  • Support Staff

May 20, 2014 at 1:59 pm

I didn’t see a screenshot in your prior reply. Was it emailed here?

support [at] eventespresso.com


Lorenzo


DM Eddy

May 20, 2014 at 7:39 pm

Hi Lorenzo, did you get my email?


Lorenzo Orlando Caum

  • Support Staff

May 20, 2014 at 8:43 pm

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


Lorenzo


DM Eddy

May 20, 2014 at 8:54 pm

Can I be selective in hiding categories? I don’t want to hide the ones that are already there – just the new ones.


Lorenzo Orlando Caum

  • Support Staff

May 20, 2014 at 9:16 pm

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.


Lorenzo


DM Eddy

May 20, 2014 at 10:10 pm

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?


Dean

May 21, 2014 at 1:45 am

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/


DM Eddy

May 23, 2014 at 6:37 am

Hi Dean, Thanks for this suggestion. I’m not sure what I’m doing wrong. This is the code snippet the link recommends:


<script type=”text/javascript”>
jQuery(‘#field_25?).children(‘option[value="5"]‘).css(‘display’,’none’);
</script>

I’m not sure what #field_25 represents. Is it the form or select name – or neither of these? Any ideas?


Dean

May 23, 2014 at 6:48 am

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>


Dean

May 23, 2014 at 6:48 am

That above snippet will remove the Power Workshop menu item


DM Eddy

May 23, 2014 at 7:08 am

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?


DM Eddy

May 23, 2014 at 7:37 am

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!


Josh

  • Support Staff

May 23, 2014 at 5:35 pm

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.


DM Eddy

May 23, 2014 at 9:55 pm

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?


DM Eddy

May 24, 2014 at 7:09 pm

Any ideas for a possible solution? I’ve tried a number of scripts including those that use .hide .remove .css. Nothing seems to work.


Sidney Harrell

May 26, 2014 at 1:20 pm

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...


DM Eddy

May 26, 2014 at 8:39 pm

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.


Dean

May 27, 2014 at 1:43 am

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);


DM Eddy

May 27, 2014 at 8:28 pm

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)?


Dean

May 28, 2014 at 1:24 am

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.

Viewing 27 reply threads

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.

Event Espresso