getLatestNews returns more news than what asked for

frankm Member
hi,

i was trying to add the latest news on my homepage. because i want to style the output to match my design i was going for the `getLatestNews` function and not `printLatestNews`.

in the zenpage option i fix to 1 the number of news i want to show. so if i do `getOption('zp_latestnews')` i end up with 1. yet if i do `getLatestNews( getOption('zp_latestnews') )` it returns more than 1 news. looking at the function itself in the zenpage-template-functions.php file, it seems to me there is a missing breaking point when `$counter` reaches `$number` (just as it is in the `printLatestNews` function which works fine). maybe this should be added to have a consistent behavior between the 2 functions.

frank.

Comments

  • acrylian Administrator, Developer
    Thanks, seems you found a bug. But it is not in `getLatestNews` but actually in the `getArticles()` function called within it. That seems to return always 5 articles no matter what you set.
  • acrylian Administrator, Developer
    Will be fixed in tonight's nightly.
Sign In or Register to comment.