WordPress.org

Ready to get started?Download WordPress

Forums

WP Calendar
linktopost for widget (5 posts)

  1. lundj
    Member
    Posted 3 years ago #

    Hey everyone,
    I really like the new feature "linktopost". But is it possible to add this option to the widget? So that the link to the synced post will be inserted.

    It would also be cool to hide links if there is no link for an event. Because otherwise there are always dead links - thats very confusing for the visitor.

    Greetings from Germany
    lundj

    http://wordpress.org/extend/plugins/wp-calendar/

  2. tmeise
    Member
    Posted 3 years ago #

    Deine erste Frage für mich zu beantworten hat mich einen Vormittag gekostet. Aber hier ist die Lösung. Im Widget änderst du die "Vorlage" in

    <strong><a href="{event_url; linktopost=false}">{event_subject}</a></strong><br />{event_startdate} {event_starttime} - {event_enddate} {event_endtime} @ {event_location}

    Dann wird direkt aus der Sidebar zum Post verlinkt.

    (Man müsste mehr PHP können ...)

  3. faebu
    Member
    Plugin Author

    Posted 3 years ago #

    Hi lundj

    If you're using the widget, the parameter {event_url; linktopost=1} creates the url to the post (if synchronised). if the event is not linked to a post, the url points to the single page view, where you can share more details - but you have to setup up the 'single page view'.

    if you only want to show a hyperlink where there is a synchronized post, you cannot use the the widget and you have to code it by yourself.

  4. tmeise
    Member
    Posted 3 years ago #

    Hi Faebu, thanks for answering.

    Where can I setup the "single page view" for not synchronized posts?

    thanks in advance

  5. faebu
    Member
    Plugin Author

    Posted 3 years ago #

    calendar settings -> third tab (event page or something similar).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic