WordPress.org

Ready to get started?Download WordPress

Forums

Custom Category List (2 posts)

  1. Jacob Roman
    Member
    Posted 1 year ago #

    Hello,

    Would anyone know of a way to display a list of specific category. Looking for something that will display the title of the post and a attached file. PDF, .DOC, .XLS, etc.

    The screenshot here would be an example.
    http://d.pr/i/4sTl

  2. Jacob Roman
    Member
    Posted 1 year ago #

    Found these links to be useful.

    http://codex.wordpress.org/Function_Reference/wp_get_attachment_image

    http://johnford.is/programmatically-pull-attachments-from-wordpress-posts/

    I have the following code.

    function postListEditLink($post){
    	$id = 811; // ID of an attachment
        echo wp_get_attachment_link( $id, '' , false, false, 'My link text' );
     };

    Which works but it is pulling that specific attachment any suggestions on how to tell it to pull the first attachment from a list of post?

Topic Closed

This topic has been closed to new replies.

About this Topic