Header text background color and padding

Home Forums Calendar Products Events Calendar PRO Header text background color and padding

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1615908
    David Sabella
    Participant

    I added some text to my calendar list view page but I have three problems.

    1) I would like this text to appear under the title and over the search bar – right now it is above the title bar – I entered this text in the settings: Display: Add HTML before event content

    2) The text is sitting on a transparent background so I can’t read it – how can I put it on a white background?

    3) There is too much padding above the page title and the top of the page. How can I change the margin so the title sits higher on the page?

    #1616321
    David Sabella
    Participant

    One more thing:

    I see that this text appears on the community events add page and all individual event pages. I would like to have this text appear only on the main calendar page in whatever view (month, week, day, etc.) is accessed. How can I ensure that?

    #1616423
    Sky
    Keymaster

    Hi there,

    Thanks for reaching out. Please note that we are limited in the amount of support we can provide for customizations such as this. That being said, I will try to get you pointed in the right direction.

    1) There is many action hooks within the events templates. You can add content by adding it to one of these hooks. To Get content to show in between the title and search bar you could use the following example.


    add_action('tribe_events_after_the_title', 'my_custom_template_content');
    function my_custom_template_content() {
    echo "

    Here is my content!

    ";
    }

    You would just add that to your theme’s functions.php file or to a functionality plugin, and change out the content that you wish to insert.

    2) Since you are adding your own content, I would wrap it in a div with a unique class, and use that to style the background color.

    3) The title itself does not have any top padding or margin. On your page, I can see that the content you’ve added is pushing the title down quite a bit, as it contains empty paragraphs. This will not be an issue once you change the order of the content.

    To learn about working with custom templates for the Events plugins, check out our Themer’s Guide.

    Hope that helps! Please let me know if you have any additional questions about this.

    Thanks,
    Sky

    #1620627
    David Sabella
    Participant

    This reply is private.

    #1620795
    Sky
    Keymaster

    Hi again,

    If you have more than one line to output, echo is not the way to go. In that case, you could do something like this:

    https://gist.github.com/skyshab/dfdf4aa9ce12088cbf078170f4cb0dd0

    For questions about using PHP, see http://php.net/docs.php

    Hope that helps!

    Thanks,
    Sky

    #1638317
    Support Droid
    Keymaster

    Hey 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Header text background color and padding’ is closed to new replies.