Forums

Download Post or pass Post ID to alternative template (2 posts)

  1. silfani
    Member
    Posted 1 year ago #

    I've been looking exhaustively for an implementation for a feature I'd like to include in my website for sometime now, but have been stumped.

    Basically, I'd like users to be able to click on a link/button and download a version of the post/custom post that uses an alternative template OR that dynamically generates and outputs a text file. I am thinking that I will need to send the post ID from the single.php file to whatever function or php page and have the browser prompt the user to save the file.

    The context of this is is that I'm very close to creating a workable reference library through wordpress using a combination of custom post types, custom fields, and custom taxonomy. Being able to download a particular reference in BIBTex or RIS format would be awesome, but I would think the answer to my question would be useful for a wide assortment of purposes.

  2. silfani
    Member
    Posted 1 year ago #

    Ok, I've find a solution finally for at least getting a link to open a post in an alternative template.

    I inserted those functions and calls in to functions.php and it worked great after I set up an alternative template.

    Also remember to insert global $post; to ensure all the post information is passed to the template.

    http://wordpress.stackexchange.com/questions/8608/how-to-quickly-switch-custom-post-type-singular-template

Topic Closed

This topic has been closed to new replies.

About this Topic