Posted: August 18, 2014 at 5:11 am
|
hey! the event title should be something like “Event One Unfortunately, if I add these links and refresh the event, all html-tags are removed from the title and only the word “detail” is left. Is there a way to change the files, that html-tags WON’T be removed from event-titles? |
|
Hi Alexander, I’m assuming this is for EE3? If not please let me know. I am also assuming you want these to be shown on the event list rather than the event itself, though the process is similar. In EE3 you can copy the /templates/event_list.php and /templates/event_list_display.php files over to wp-content/uploads/espresso/templates. Copying them there allows you to edit them without the edits being over writen on update. From there you would need to edit the event_list_display.php file. You will see on line 43 this:
That can be edited to change the event title within the event list. Just adding - Details after that should give you what you want, if I have understood your query correctly: screenshot http://take.ms/Simam Hope that helps. |
|
Hi Dean! If I put the link in the template files, I would have the SAME link on all events. What I want is, that i can add the link in the EVENT NAME field, when I’m creating a new event. For example: If you create a new wordpress page or article, you can easily put some html-tags inside the title-field. If I put html tags inside the event-name field and create the new event, the html-tags are removed. I only need a way, that the event-title-field WON’T remove the links that I enter! thanks and br! |
|
Hi, Thank isn’t possible I’m afraid, we strip HTML out. Even in a standard WP post, while HTML is allowed, links will simply break as they conflict with the Permalinks. You could instead create a function that pulls in a custom meta field and appends it to the title. As EE3 doesn’t use custom post types, you would need to do it in the template files, but that would allow you to set the URL from within the post (or not) rather than hardcoding things. |
|
It would be no problem for me to change the template files – I had to change so much in the core-files 😉 In a normal wordpress article, html is allowed in the titles. I’ve just created a small demo: http://www.alexander-mueller.at/fotokurse/textlink-details/. Isn’t there a way to “deactivate” the function, that strips out the html in the event-titles? It’s no problem if the link would be everywhere the event-title is placed (for example on the booking page, calendar, and so on). Again, I’m not afraid to delete a small part of the core-file 🙂 thanks! |
|
Hi, The HTML is allowed, but the link is broken (http://www.alexander-mueller.at/fotokurse/textlink-details/www.text.com). Anyway, though I strongly advise against it, you can find the code that sanitises the title in /wp-content/plugins/event-espresso/includes/event-management/insert_event.php sanitize_text_field($_REQUEST[‘event’]) is what will need to be changed. Hope that helps. |
|
thanks for the advice! worked for me 🙂 thanks! |
Hi Alexander, You can change this directly in the database using PHPmyadmin. |
|
The support post ‘Manual Links in Event Titles’ 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.