• My summary content contains a link to an external page, which I would like displayed on the list of upcoming events. To display upcoming events I’m using the code:

    [vsel posts_per_page=3 date_label="%s" time_label="%s" ]

    However the “a href” code is being stripped out, and the information is only appearing as plain text. Is there any way I can force it to display as a link?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Guido

    (@guido07111975)

    Hi,

    I use a default WordPress function for the summary, called the_excerpt() and this strips all html tags from the text. You cannot add the link in another part of the event content, so it’s not included in the summary?

    Guido

    Thread Starter babs_UK

    (@babs_uk)

    Thanks Guido.

    The client wants 3 links displayed on the home page using the upcoming events shortcode above. I tried adding the links to the meta but I’ve run out of time to make the changes …

    Thread Starter babs_UK

    (@babs_uk)

    I’ve added this code to my functions.php and it’s working OK for a blog post excerpt, but not for the event excerpt …

    Thread Starter babs_UK

    (@babs_uk)

    The above code works and it displays the HTML if I pull it through from the main content; but not if I use the summary function …

    Plugin Author Guido

    (@guido07111975)

    Hi,

    Guess you mean the custom summary that you can set while adding an event?
    In this case you should make some changes in the plugin itself, because the default wp_excerpt() isn’t being used here.

    1) Open file vsel and look for:

    
    update_post_meta( $post_id, 'event-summary', esc_textarea( $_POST['vsel-summary'] ) ); 
    

    change into:

    
    update_post_meta( $post_id, 'event-summary', wp_kses_post( $_POST['vsel-summary'] ) );
    

    2) Open the relevant (or all) shortcode file(s) and look for:

    
    $output .= apply_filters( 'the_excerpt', $event_summary );
    

    Change into:

    
    $output .= wpautop(wp_kses_post($event_summary));
    

    This should do the trick ??

    Guido

    Thread Starter babs_UK

    (@babs_uk)

    Amazing! Thank you. Works perfectly.

    Plugin Author Guido

    (@guido07111975)

    Great. Unfortunately there’s no solution without changing my plugin files directly.

    And thanks for your review ??

    Guido

    Thread Starter babs_UK

    (@babs_uk)

    HI – I’ve changed this back from “Resolved” as I’m now having an issue with the link on the mobile view. It’s working fine on the desktop view, but not on the mobile.

    Any ideas where I can find that code to update? I’m drawing a blank.

    Thanks!!

    Plugin Author Guido

    (@guido07111975)

    Hi,

    Strange, there should be no difference with display of links between desktop and mobile view.

    What’s not displayed properly in mobile? The link itself? Do you have an URL to a site perhaps?

    Guido

    Thread Starter babs_UK

    (@babs_uk)

    Hi Guido – that’s what’s confusing me. I can’t see where there’s any code attached to a media query to change the link!

    URL is https://johnnicholsons.com/ and the links are under the auction events on the home page. They work OK on desktop, but not on a mobile view.

    Plugin Author Guido

    (@guido07111975)

    Hi,

    I have an old Windows Phone and the links which are in the event excerpt/summary-area do open here. So no issues with links on my mobile Phone.

    What does not work at your mobile? Do the links not open?

    Guido

    Thread Starter babs_UK

    (@babs_uk)

    Hi Guido – The links are not clickable at all. I’ve checked on my iPhone and also if I reduce down my browser window to trigger the mobile view, then it doesn’t work there either.

    Plugin Author Guido

    (@guido07111975)

    Hi,

    I do notice it now. It only happens at your homepage, not on the auctions page.

    It’s caused because of your customizations of div vsel-image-info. You’ve relocated the image, used position:absolute; for this, and this way div vsel-image-info overflows block vsel-meta (which contains the link and more).

    Guido

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Link being stripped from summary’ is closed to new replies.