• Resolved dadolux

    (@dadolux)


    Goodmorning,

    In the specific event page I would like to show the link of the facebook event.
    I am editing your code, is there any method to get the original id of facebook events?

    Thank you very much!
    Great work with this plugin!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Xylus Themes

    (@xylus)

    Hello @dadolux,

    Nice to know that you liked our plugin and its useful to you. We will appreciate if you can post review here.

    Showing Event detail page link feature is available with Pro version. You can also contact us on our website for more and quicker support.

    Thanks

    Thread Starter dadolux

    (@dadolux)

    Thank you for your support,
    If I buy the PRO version of your plugin, I can set up the direct link to the facebook event page?
    Example: I put the shortcode in the home page, and it will show all the next events I previously inserted. When I click on an event I would like it will redirect me to “facebook.com/events/EVENT_ID”.
    Is it possible?

    Thank you again!

    Plugin Author Xylus Themes

    (@xylus)

    Hello @dadolux,

    For any query related to Pro version, Please contact on our website support We are not allowed to give support for same here.

    Plugin has below facilities.
    – Import all events of page, group or by EventID
    – Show events using sortcode or use it with supported 3rd party Event calendar
    – On click on link you can redirect to event detail page which has source link also facebook.com/events/EVENT_ID.

    So you achieve it

    Thanks

    Hi @dadolux and @xylus,

    I had the same problem today and managed to figure it out after digging around in the plugin’s files.

    When an event is imported, the ID is saved in the meta data of the post. You can retrieve it by using the ife_facebook_event_id meta value stored in each post.

    For example:

    
    <?php
    $event_id = get_the_ID();
    $facebook_id = get_post_meta( $event_id, 'ife_facebook_event_id', true );
    
    <a target="_blank" href="https://www.facebook.com/event/<?php echo $facebook_id; ?>">View Event on Facebook</a>
    ?>
    

    Hope this helps anyone facing this issue. I would recommend updating the docs for this plugin to include this, as it’s a commonly used variable and feature. Great plugin!

    Cheers,
    Cody

    • This reply was modified 7 years, 4 months ago by cody123.
    • This reply was modified 7 years, 4 months ago by cody123. Reason: code update
    • This reply was modified 7 years, 4 months ago by cody123. Reason: grammer

    Sorry, I put the PHP close tag after the HTML. The proper markup would be:

    <?php
    $event_id = get_the_ID();
    $facebook_id = get_post_meta( $event_id, 'ife_facebook_event_id', true );
    ?>
    
    <a target="_blank" href="https://www.facebook.com/event/<?php echo $facebook_id; ?>">View Event on Facebook</a>
    

    Hello @cody123, could you please help me out, I want to link the facebook events directly to the facebook event page and not an event page inside my WordPress website, could you please tell me where to paste this code? ?? Thanks!
    Cheers,
    Sofia.-

    Hello @sophiesaxlund,

    You can put this code in archieve-content.php on line no 34 https://prntscr.com/i3t3ze remove this line and add below code.

    https://prntscr.com/i3t3jn

    Let us know if you have any query.
    Thanks

    • This reply was modified 7 years, 2 months ago by lisha56.
    • This reply was modified 7 years, 2 months ago by lisha56.

    Hi @sophiesaxlund,

    This can be placed anywhere you need a link to the post in your code. It can’t be used in the WP content editor or in the backend of WP. I would ask the plugin author to add this feature if you need it, or write a function that outputs that code and put it in functions.php

    I wouldn’t suggest changing the base plugin code @lisha56, as it will be overwritten on update and can also cause further issues down the road. I personally recommend writing a function that will output the link based on the post ID that can be placed in functions.php.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Link to facebook event’ is closed to new replies.