Home › Forums › Calendar Products › Community Events › Where is "My Events" php file?
- This topic has 11 replies, 3 voices, and was last updated 9 years, 10 months ago by
Michael.
-
AuthorPosts
-
June 14, 2016 at 8:08 am #1126705
Michael
ParticipantHey Guys,
quick question…I Need to edit the My Events page, that you can access through exampleurl.com/events/community/add page.
I am not seeing it under plugins/the events calendar community/src/views. Where could I find this file?
Thanks a bunch!
RobJune 14, 2016 at 3:18 pm #1127054Andras
KeymasterHi Rob,
Thanks for reaching out!
That view is not really a template as it contains more elements than just text. However, you could add something like the below to your theme’s functions.php file to get custom content on top of that page.
add_filter('tribe_events_before_html', 'tribe_custom_commmunity_content');function tribe_custom_commmunity_content() {
// We'll add content to the Community Events header only
if ( tribe_is_community_edit_event_page() )return '<p>Your custom content here!</p>';
}
Will that do the trick for you? Please let me know. ?Cheers,
AndrasJune 15, 2016 at 7:04 am #1127272Michael
ParticipantThanks Andras!
This isn’t what I am going for actually. I am actually wanting to remove the from the links on the page. It takes my btn class, and it looks really bad.I am not too fluent in PHP, so I am not sure how I could add a function that removes any class from the ‘s.
June 15, 2016 at 9:00 am #1127325Andras
KeymasterHello Rob,
You can try to remove the class from the elements using jQuery.
For that you need 1) A .js file (wp-content/themes/{your-theme}/js/myscript.js) and 2) some code in your functions.php file.
The content of the .js file will be the jQuery call to remove the class from the buttons. Here’s an example:
jQuery(document).ready(function($) {
$(".wc_email_inquiry_email_button").addClass("button alt").removeClass("wc_email_inquiry_email_button");
})
This says, when document loads, then take all html elements that have the class wc_email_inquiry_email_button and add the classes button and alt, and remove the class wc_email_inquiry_email_button.You will just need to find appropriate classes or IDs for reference.
The snippet in functions.php:
add_action( 'wp_enqueue_scripts', 'add_my_script' );
function add_my_script() {
wp_enqueue_script(
'your-script', // name your script so that you can attach other scripts and de-register, etc.
get_stylesheet_directory_uri() . '/js/myscript.js', // this is the location of your script file
array('jquery') // this array lists the scripts upon which your script depends
);
}
Unfortunately I cannot give you more specifics as that part of your page is restricted.This should get you started. If you need more info on jQuery, then I reco the jQuery site or w3schools.
Let me know if you have any follow up questions.
Cheers,
AndrasJune 15, 2016 at 9:18 am #1127336Michael
ParticipantAndras,
You really know your stuff, for some reason I went to the page and it appears normal now. So I am so sorry for making you go through that. I am utterly lost this morning, I am not sure how the page fixed itself (unless you went in and did it for me) but it appears just how I want it to now…The other issue at hand is that my Custom Fields are not being posted on my event pages. What could be causing this? I deleted my whole themers guide folder, and it didn’t show up, so there was no code in there that could be hiding it. I also checked my functions file, and there was no code hiding it in there either. I checked in my global CSS and JS editor through WP and there was nothing hiding it there either. I am not sure what else could be hiding it.
Thanks for everything you do Andras,
RobJune 15, 2016 at 10:23 am #1127437Michael
ParticipantThis reply is private.
June 16, 2016 at 8:16 am #1127897Andras
KeymasterThis reply is private.
June 16, 2016 at 8:43 am #1127915Michael
ParticipantAh nope,
I am talking about the Additional Fields. It is part of the plugin for PRO.
It usually shows up under “Other” on an event Page as part of the meta.June 16, 2016 at 12:56 pm #1128119Andras
KeymasterHi again,
Hmmm… that is unexpected behavior if you give values to them when editing the event.
Could you share a screenshot with the settings of the Additional fields of an event, and a also a link to that events page?
Also if you could share your system information, that would be really helpful.
Thanks,
AndrasJune 16, 2016 at 1:35 pm #1128149Michael
ParticipantAndras,
I’m an idiot lol…
I had nothing filled out in the additional fields lol…
I just expected them to show something there.
Thanks!
RobJune 17, 2016 at 1:24 am #1128303Andras
KeymasterHey Rob,
Let me assure you, this happens to a lot of us and doesn’t make you an idiot. 🙂
I’m glad we were able to figure this out. Since the issue is solved, I’m going to close this ticket.
If you need any other help, feel free to open a new thread and we will be here to help you out.
Cheers,
AndrasPS: If you like our plugins we would be grateful for a review on the wordpress.org site. Thanks!
-
AuthorPosts
- The topic ‘Where is "My Events" php file?’ is closed to new replies.
