• Resolved rapportdesign

    (@rapportdesign)


    Website: https://www.urlgone.com/a7d7bf/

    I’m using the following shortcode within a Store Locator plugin…
    [events_list]<p>#_EVENTLINK #_EVENTDATES</p>[/events_list]

    Dates further than a month away aren’t listed.
    It’s as if scope is set to “month”.
    I’ve tried adding scope=”future”, but it makes no difference.

    I’ve used this same shortcode within my location pages, but with the following attributes included and everything worked well…
    location=”6″
    category=”18″

    These attributes were ignored when used within the Store Locator plugin, so I found an alternative way of filtering down the events.
    This is likely to be the reason scope=”future” made no difference, as event attributes don’t seem to work when used with a 3rd party plugin.
    Just to clarify, before I added any of the code used to filter down the events, there was still only a months worth of dates listed.

    I understand use within 3rd party plugins probably isn’t something you can help with, but it’s worth asking.

    https://www.ads-software.com/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Not sure if we’ll be able to help, but can you tell us more about how you’ve integrated the two plugins? Thanks.

    Thread Starter rapportdesign

    (@rapportdesign)

    I’m building a website for a training company.

    They want users to be able to enter their postcode, select a course and all the training locations that run that course are returned.

    They want the available dates for that course and training location to be selectable from the training location search results.

    I’ve therefore used Events Manager to create the courses for the various dates and locations and I’m using Store Locator Plus for the training locations search option.

    The shortcodes you provided worked great at listing events when used on the location pages created with events manager.

    As far as integrating the 2 plugins, I’ve done nothing more than try and use the same shortcode with the Store Locator Plus plugin.
    The Store Locator Plus plugin, uses the following code to output the search results and as you can see below, I’ve added the shortcode in at the bottom.

    'resultslayout'  =>
    '<div id="slp_results_[slp_location id]" class="results_entry  [slp_location featured]">
        <div class="results_row_left_column"   id="slp_left_cell_[slp_location id]"   >
            <span class="location_name">[slp_location name]</span>
            <span class="location_distance">[slp_location distance_1] [slp_location distance_unit]</span>
        </div>
        <div class="results_row_center_column" id="slp_center_cell_[slp_location id]" >
            <span class="slp_result_address slp_result_street">[slp_location address]</span>
            <span class="slp_result_address slp_result_street2">[slp_location address2]</span>
            <span class="slp_result_address slp_result_citystatezip">[slp_location city_state_zip]</span>
            <span class="slp_result_address slp_result_country">[slp_location country]</span>
            <span class="slp_result_address slp_result_phone">[slp_location phone]</span>
            <span class="slp_result_address slp_result_fax">[slp_location fax]</span>
        </div>
        <div class="results_row_right_column"  id="slp_right_cell_[slp_location id]"  >
            <span class="slp_result_contact slp_result_website">[slp_location web_link]</span>
            <span class="slp_result_contact slp_result_email">[slp_location email_link]</span>
            <span class="slp_result_contact slp_result_directions"><a href="https://[slp_location map_domain]/maps?saddr=[slp_location search_address]&daddr=[slp_location location_address]" target="_blank" class="storelocatorlink">[slp_location directions_text]</a></span>
            <span class="slp_result_contact slp_result_hours">[slp_location hours]</span>
            [slp_location iconarray wrap="fullspan"]
            [slp_location socialiconarray wrap="fullspan"]
            </div>
            [events_list]<p class="courseDetail #_CATEGORYID #_LOCATIONID">#_EVENTLINK #_EVENTDATES</p>[/events_list]
    </div>'

    Where is that code? If it’s in a PHP template you’ll probably need to use do_shortcode to make the shortcode run.

    Thread Starter rapportdesign

    (@rapportdesign)

    My understanding of PHP isn’t great, but from what I can tell it’s PHP storing HTML into a variable, which is later used to display the search results…

    'resultslayout' =>

    I tried breaking the quotes that contain the HTML with a . and including the shortcode via PHP, but that displayed nothing.

    [slp_location socialiconarray wrap="fullspan"]
            </div>'
            . echo do_shortcode('[events_list]<p class="courseDetail #_CATEGORYID #_LOCATIONID">#_EVENTLINK #_EVENTDATES</p>[/events_list]'); .
            '<iframe height="0" src="https://test5.rapdevs.co.uk/location-[slp_location id].php"></iframe>
    </div>'

    The fact that the shortcode is returning some dates, suggests it’s working on some level and using PHP to echo the shortcode probably isn’t required.

    Hiya,

    You need to looking at running your content there through the do_shortcode filter.

    It sounds like you would be best off seeking the assistance of a developer here though, really.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Event Shortcode Use in 3rd Party Plugin’ is closed to new replies.