Simple post listing
Can custom fields be added to the plugin? (2 posts)

  1. nigelparrydotnet
    Posted 4 years ago #

    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:

    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?


  2. nigelparrydotnet
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple post listing
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.