Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1278450

    I need to download a press release pdf file added by date.
    I mean I have a category (press release) and many post. Each post has only the title and the pdf attacched.
    I would like to show the post as a list (like the magazine element so user can see date, title, author and so on) but without enter in single post (where i added manyally the pdf).
    User see list and click only on title or image preview to download the pdf.
    Important I need that the list has to be sorted by date, so I need (i think) to use magazine element

    Thx

    #1279110

    Hey bubaweb,

    Thank you for the inquiry.

    This should be possible but you may need to modify the enfold\config-templatebuilder\avia-shortcodes\magazine\magazine.php file directly, around line 1111. you will find the default link.

    $link = get_permalink( $entry->ID );
    

    You can replace the value of the $link variable with the PDF link instead of the post URL, maybe by saving it as a custom field. If you go that route, you will have to use the get_post_meta function in order to retrieve the PDF link or the value of the custom field.

    // https://developer.wordpress.org/reference/functions/get_post_meta/

    This plugin might also help.

    // https://wordpress.org/plugins/advanced-custom-fields/

    But it is a bit of an overkill if you are not planning to use a lot of custom fields.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.