Placing and Modifying Recommended Events

Home Forums Calendar Products Events Calendar PRO Placing and Modifying Recommended Events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1051555
    fifteen15studios
    Participant

    The related events feature is fantastic! I would, however, like to make a few adjustments. I was wondering if the following were possible, and if so, how to do them.

    On a single event listing, there are three recommendations at the bottom of the page. Can I increase this number? If so, how?

    Can I place recommended events elsewhere on my page, such as on the bottom of a custom page? If so, how?

    Where would I go to adjust the presentation of recommended events? Can I present it differently on different pages? If so, how?

    Thanks!
    Brendan

    #1051901
    George
    Participant

    Hi Brendan,

    Thanks for the kind words about the Related Events feature – while we unfortunately cannot help with customizations, the Related Events module is indeed quite flexible and I will address each of your questions as follows:

    On a single event listing, there are three recommendations at the bottom of the page. Can I increase this number? If so, how?

    Yes, you can do this by adding code like the following to your theme’s functions.php file:


    /**
    * Increase number of events in "Related Events" modules.
    *
    * @link http://theeventscalendar.com/?p=1051555
    */
    add_filter( 'tribe_related_posts_args', 'tribe_support_1051555' );

    function tribe_support_1051555( $args ) {
    $args['posts_per_page'] = 9;

    return $args;
    }


    Next, you ask this:

    Can I place recommended events elsewhere on my page, such as on the bottom of a custom page? If so, how?

    Sort of – the related events are retrieved via a simple function called tribe_get_related_posts() which you can find in your Events Calendar Pro plugin files in events-calendar-pro/src/functions/template-tags/general.php

    Please read this function to see how it works. We cannot help with custom coding, so you will have to take this function and play around with it, but a word of advice – be sure to supply the $post argument to this function (see and read the function in your code to know what I’m referring to). This $post argument is the post that the function will use as the “base” post, to find posts related to it.


    Where would I go to adjust the presentation of recommended events? Can I present it differently on different pages? If so, how?

    In terms of presenting things on different pages, see my above reply about doing that. To customize the appearance of things, yes, you can do this CSS. You can write CSS in numerous places, like your theme’s style.css – research online for more information about CSS and how to use it if you are not familiar.

    Brendan, I hate to reiterate this point again but I am only doing so because I just recently took another thread where you are asking for some customization help. We try to help as much as possible, especially for you because in your threads you’ve got a good track record of being quite polite and kind 🙂 However, we cannot help with custom coding, and so I just want to state this clearly so that the expectations surrounding these support forums are clear.

    See the “Product Support” section on this page for more information before opening any new threads → http://theeventscalendar.com/terms

    I’m sorry to harp on this disclaimer, Brendan. Please heed it going forward, but also, for now, let me know if any of my advice in this thread is helpful 🙂

    Cheers,
    George

    #1076539
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Placing and Modifying Recommended Events’ is closed to new replies.