Home › Forums › Calendar Products › Events Calendar PRO › Need to customize the file: organizer.php
- This topic has 6 replies, 2 voices, and was last updated 8 years, 6 months ago by
Joseph Crestuk.
-
AuthorPosts
-
September 29, 2017 at 6:48 am #1356695
Joseph Crestuk
ParticipantHello, i need to customize the organizer.php file, (the correct way within the theme).
Path: plugins/the-events-calendar/src/functions/template-tags/organizer.php
I tried adding it to the folder mytheme/tribe-events/
—I referred to https://theeventscalendar.com/knowledgebase/themers-guide/ and did not see a solution for this.
Additionally, the reason I am editing this file, is due to an error within the plugin that causes a broken link. The plugin adds a closing “a tag” within an “a href” for the organizers’ website, which when crawled by a bot can be seen as an error. If a developer could look into this and fix it on the next update, would be appreciated too.
-Thanks
-
This topic was modified 8 years, 7 months ago by
Joseph Crestuk. Reason: Typeo: "a tag" was stripped
September 29, 2017 at 6:59 am #1356702Joseph Crestuk
ParticipantThis reply is private.
September 29, 2017 at 8:29 pm #1357186Cliff
MemberHi, Joseph.
1)
Only files in the /wp-content/plugins/the-events-calendar/src/views/ directory (including its subdirectories) can be overridden via the Themer’s Guide
2)
This is the latest release of that organizer.php file: https://github.com/moderntribe/the-events-calendar/blob/4.6/src/functions/template-tags/organizer.php
You’re welcome to submit a pull request or point out the specific line number(s) that you’re having an issue with.
October 3, 2017 at 6:12 am #1358237Joseph Crestuk
ParticipantThanks for the response. Here is the code causing a broken link to pass along to the plugin developers.
Line 305:
$html = sprintf(
‘<a_ href=”%s” target=”%s”>%s‘,
esc_attr( esc_url( $url ) ),
apply_filters( ‘tribe_get_organizer_website_link_target’, ‘_self’ ),
apply_filters( ‘tribe_get_organizer_website_link_label’, esc_html( $label ) )
);
} else {
$html = ”;When line 306 is commented out the “broken link” is fixed
// ‘<a_ href=”%s” target=”%s”>%s‘,Here is the before:
<a_>www.dansvilledental.com“>
<a_ href=”http://www.dansvilledental.com” target=”_self”>www.dansvilledental.comHere is the after:
<a_>www.dansvilledental.com”-Thanks
-
This reply was modified 8 years, 7 months ago by
Joseph Crestuk. Reason: a hrefs were being turned into links so i added _ after a
-
This reply was modified 8 years, 7 months ago by
Joseph Crestuk.
October 3, 2017 at 3:17 pm #1358589Cliff
MemberJoseph, none of that code looks to have come through cleanly so I can’t understand exactly the issue.
However, looking at Line 306, it’s one line of a multi-line sprintf so commenting it out would cause a PHP error.
Feel free to submit a pull request. Here are guidelines how to do this: https://moderntribe.github.io/products-engineering/git/branching/
October 25, 2017 at 9:35 am #1368721Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
This topic was modified 8 years, 7 months ago by
-
AuthorPosts
- The topic ‘Need to customize the file: organizer.php’ is closed to new replies.
