Hi All,
This is probably simple. I am trying to make a list with just things that are newly added. But not include edited old entries that are newly edited. I think this code is adding to the list the newest published articles. I do not want the newest published articles. I want it to list just the "newest issue" Like after issue 50, I post new posts with the category Issue 51, then 50 should dissapear.Heres my code what do you think?
<?php
// home.php - template for the front page
// OPF theme for WordPress by ___________
// function to get an index listing for the latest issue
// automagically updated to the latest issue, every time one is published
function opfLatestIssueIndex() {
global $wpdb;
// first we determine which category corresponds to the latest issue
// the parent category that holds all issues has ID 3
// every time we add a new issue, it gets a higher ID,
// so we want the highest ID that has as its parent ID 3
$issueCatsSql = "SELECT cat_id FROM <code>opf2_categories</code> WHERE category_parent=3 ORDER BY cat_id DESC";
$issueCatIDs = array();
$issueCatIDs = $wpdb->get_col($issueCatsSql);
$latestIssueID = $issueCatIDs[0]; // the first one in the descending list is the latest
// then we let the plugin produce this as a nice index list
c2c_get_recent_posts ($num_posts = 25,
$format = "<li>%post_URL%</li>",
$categories = $latestIssueID, // category ID of latest issue
$orderby = 'date',
$order = 'ASC');
}