• Resolved care2michelle

    (@care2michelle)


    My site is not live yet, so I don’t have a link. I will update this post when it is. Currently, we have pdfs linked just from the media library. So when a user clicks on the title or the “read more” button, the pdf opens in a separate application (adobe, view etc.) in a new tab.

    We’d like to keep the users on our website, and not require them to use a different application to view the pdf. I’ve installed Document Embedder, and I like the look of the embedded pdf. However, I’d like the embed to open ONLY when the title or “read more” option is clicked, not to be continuously open by default. It doesn’t matter to me if it opens in the same page or in a new tab. I just don’t want all the pdfs open all the time as it clutters the look of the page.

    I’ve tried converting the short code to html and embedding it as a link:
    <a href="<?php echo do_shortcode('[doc id=1098]');?>">Mourning the Death of a Spouse</a>

    where [doc id=1098] is the shortcode generated by Document Embedder for the document, and Mourning the Loss of a Spouse is the name of the article. But that doesn’t work. It shows up in the FSE as looking like the Title is hyperlinked, but when I preview the page, the content disappears entirely, so there isn’t anything to click to show the embed.

    Is what I want to do even possible with this plugin or should I be trying another solution?

    thanks in advance

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Open embed only on link?’ is closed to new replies.