WordPress.org

Support

Support » Plugins and Hacks » Simple post listing » [Plugin: Simple post listing] Can custom fields be added to the plugin?

[Plugin: Simple post listing] Can custom fields be added to the plugin?

  • Basically I am working on a setup for an online mag. Pages must be used as indexes for each issue, because there’s content that needs to be added in addition to the online articles (ie. list of articles only in the print mag).

    So instead of creating a WP username for every single author (or two authors writing together) the author name is being stored in a Custom field.

    I am therefore trying to list, on this page, the following:

    TITLE OF POST
    Author name (from the Custom Field *not* from the WP user table)
    Excerpt (and thumbnail if there is one)

    Your plugin I’m using lists all posts from a specified tag (named something like “Issue 55”) in its shortcode. It’s spitting out title and excerpt now.

    To get a custom field (ideally a conditional one, as in if field is not empty then echo “By custom_author_field”) should I attempt to edit the plugin? Can you suggest a way to achieve this goal that isn’t too complex?

    It works great now, BTW, I’m just hoping for a way to add a custom field in the template. Looking around, even the RSS reader plugins don’t seem to accomodate that. Is that how you’re getting the info, from the RSS feed? Should I therefore try to figure out a way to add a custom author field to the RSS field?

    http://wordpress.org/extend/plugins/simple-post-listing/

Viewing 1 replies (of 1 total)
  • I went ahead and tried it with this code, inserted after the plugin code where the title H2 ends:

    // Show Author if one entered
    		$MAGauthor = get_post_custom_values("MAG-author"); 
    
    		if ($MAGauthor!="") {
    		echo '<div id="fair-byline">By <a href="
                     http://MAGsite.com/?s=' .$MAGauthor[0]. '">' .$MAGauthor[0].  '</A></div>';
    }

    However what this does is merely list each of the bylines of the articles up at the top. I am unclear how to insert the byline which works fine, in the correct place.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Simple post listing] Can custom fields be added to the plugin?’ is closed to new replies.
Skip to toolbar