WordPress.org

Ready to get started?Download WordPress

Forums

Zotpress
[resolved] Include link for Bibtex citation in zotpress shortcode (5 posts)

  1. tmeche87
    Member
    Posted 11 months ago #

    Hey!

    I am using the zotpress shortcode within a template file to display citations within a collection as well as a download link for the publication. The shortcode looks like this:

    <?php echo do_shortcode( '[zotpress collection="JUUEUA7U" download="yes"]' ); ?>

    However, I also need to include a link to download a bibtex citation. The code I was using to get the bibtex citation looks like this:

    <a class="zp-CiteRIS" title="Cite in Bibtex Format" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://api.zotero.org']);" href='<?php echo https://api.zotero.org/groups/136048/items/itemid ?>'>(Bibtex)</a>

    "itemid" is the zotero item ID of the publication.
    However, this does not work because the zotpress shortcode displays all of the publications within the collection and the (Bibtex) link only displays itself after all of the publications have been listed. I need to reference each item ID within a collection and have a link for each publication which gives a Bibtex citation download.

    Does anyone know if this is possible?

    Thanks for any and all help!

    http://wordpress.org/plugins/zotpress/

  2. Katie
    Member
    Plugin Author

    Posted 11 months ago #

    Have you tried the "cite" attribute? e.g.

    <?php echo do_shortcode( '[zotpress collection="JUUEUA7U" download="yes" cite="yes"]' ); ?>

  3. tmeche87
    Member
    Posted 11 months ago #

    Well, now I feel a little silly. I thought that controlled how it was cited on the website. I used cite="yes" and it worked.

    Thanks for being a genius Katie :)

  4. Katie
    Member
    Plugin Author

    Posted 11 months ago #

    Great! Sorry about the confusion. Would something like "citeable" be more intuitive?

  5. tmeche87
    Member
    Posted 11 months ago #

    Hey Katie!

    It may be a little more intuitive. But really I blame myself for assuming instead of reading up on it to see it's actual functionality.

    Thanks for help with semi-unintelligent questions lol

    Love the plugin!

Reply

You must log in to post.

About this Plugin

About this Topic