• Resolved eventiatmilano

    (@eventiatmilano)


    Hello there,
    I installed the Kadence template and I purchased Kadence Pro Block and Kadence Pro plugin.

    I am trying to migrate a site with thousands of articles and events (created by The Events Calendar ver. 5.12.0) from the Eventica theme to the Kadence theme (with TEC ver. 6.6.1), which I assumed was suitable for use with The Events Calendar.

    I’m trying to correctly set the H1 tag value (text inserted at the top, with a red background, see this screenshot), so that for example:

    – the Theatre category has H1 = “Theatre in Milan: events in the city and surroundings”
    – the Exhibitions category has H1 = “Exhibitions in Milan: events in the city and surroundings”
    – the X category has H1 = “X in Milan: events in the city and surroundings”

    I tried, without succeeding, to create a Kadence element to manage a specific category, “Concerts”: the result is shown in this screenshot: https://snipboard.io/wROl3E.jpg

    Can you help me write a PHP snippet to generate the required H1 value? After all, I only need to display an H1 with the category name, within each category page, followed by the text ” in Milan: events in the city and surroundings”.

    Regards,
    Paolo

    p.s. I have already written to the Kadence support team, without unfortunately getting a response relevant to my requirements.

    Website URL where we can see more details: https://eventiatmilano2.netsons.org/eventi/categoria/concerti/

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Darian

    (@d0153)

    Hi @eventiatmilano

    Thanks for your response. Let me help you with this one.

    On your category page, you have two H1 tags, one from the header w/ red background and one just above the calendar.

    To confirm, do you want the text that has a red background as-is, and update the the H1 tag above the calendar so it will have this value “<category> in Milan: events in the city and surroundings” ?

    Thread Starter eventiatmilano

    (@eventiatmilano)

    Hi Darian,

    Thank you for your reply, I will try to add the necessary clarifications below.

    I have listed the two changes I would like to make directly in this screenshot.

    In the event category pages, I would like to insert a single H1 tag, valorised using a prefixed text, following the string ‘X’ (where ‘X’ is the name of the event category): so in general we will have H1 equal to ‘X a Milano: eventi in città e dintorni’.

    For simplicity, let us look at the changes for a specific page:

    1. For the event category ‘Concerts’, I would like to keep only the H1 tag with a red background, and I would like it to have exactly the following “title” in the upper section: ‘Concerti a Milano: eventi in città e dintorni’ (without any newline character after the word ‘Concerts’).
    2. For the event category ‘Concerts’, I would like to delete the word ‘Concerts’ in the H1 tag which is located just above the calendar.

    By implementing the changes described above, event category pages would also have the same layout as event pages (e.g. this one), with the “title” inside the H1 tag in the red band at the top.

    Thank you again for your helpful support!

    Regards,

    Paolo

    Plugin Support tristan083

    (@tristan083)

    Hi @eventiatmilano ,

    Thank you for your message and the clarification.

    This is something that may be possible with template customization; however, such an endeavor would require extensive knowledge in web programming, and we, the support team, is not equipped with such command. — Please see our scope of support page.

    If you are comfortable handling (or writing) code, an excellent place to start finding documentation of our code functions would be our?DevDocs: and our?themer’s guide.

    Should you wish to move forward with template customization, the file of interest would be the following:

    \wp-content\plugins\the-events-calendar\src\views\v2\components\header-title.php

    Plugin Support Darian

    (@d0153)

    Hi there,

    It seems like this thread has been quiet for a bit, so we’ll go ahead and mark it as resolved. However, if any further questions or concerns come up, please don’t hesitate to start a new thread.

    Thread Starter eventiatmilano

    (@eventiatmilano)

    Hi Darian,

    How can I tell if I am on the https://eventiatmilano2.netsons.org/eventi/categoria/concerti/elenco/, o nella pagina https://eventiatmilano2.netsons.org/eventi/categoria/concerti/ or on the page https://eventiatmilano2.netsons.org/eventi/categoria/concerti/mese?

    I need to apply business logic that varies according to the ‘view’, but I have no idea how to check the active ‘view’ on the page.

    And above all, what happens when the user clicks on the ‘List’, ‘Month’ or ‘Day’ buttons? Is the active ‘view’ updated?

    Thanks for the support,

    Paolo

    Plugin Support Darian

    (@d0153)

    Hi @eventiatmilano

    Thanks for your message.

    The view can be seen in the URL (“/mese”, “/elenco”). If it’s not present in the URL, then the default view will be the default view that you set from Events > Settings > Display (Default view and Default mobile view). When you click the?‘List’, ‘Month’, or ‘Day’ buttons, the URL will also be updated.

    I hope this helps. Let me know if you have further questions or concerns.

    Thread Starter eventiatmilano

    (@eventiatmilano)

    Hi Darian,

    thank you for your support.

    To check the active ‘view’ and apply the corresponding logic, do I have to use a function that checks the page URL? Or is there some specific function in The Events Calendar that allows me to test whether I am in the ‘month’, ‘list’, etc. view?

    I know about tribe_is_month() function, but I do not know if it can be used with ‘v2’ views.

    I have activated a snippet on my staging site that should allow a different H1 tag to be displayed, depending on the page: you can download it at this link.

    This snippet use add_action( ‘tribe_template_before_include:events/v2/components/events-bar/search/keyword’, ‘set_page_H2_tag’, 15, 1);

    I do not understand why on this page (for the event category “teatro”) the H1 tag, with text “Prossimi eventi a Milano” is placed inside the search bar, instead of before the search bar!

    Can you tell me how to solve this problem?

    Thanks a lot, have a nice day,

    Paolo

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.