Tagged Questions
0
votes
1answer
227 views
How to reset post data properly
I have this piece of code that I am calling within the loop to get image metadata ( title/caption and description ). It works fine but it only works for the first post in the loop. So I assume it ...
3
votes
1answer
104 views
How to add paging to query
In the script below, I'm calling out from archive.php to functions.php to retrieve a list of posts that have been flagged in a category reserved for my "blog" posts. I'm listing these posts in summary ...
0
votes
2answers
262 views
How to query the latest 5 posts and sort them by title?
I'm looking to draw a menu listing of the latest "n" number posts, where the number "n" will be a user defined setting stored as an option.
n = 5; //Pull the latest 5 posts from the database.
The ...
0
votes
2answers
884 views
Am I using get_posts wrong?
I have
<?php
$folioPosts = get_posts(array('category_name' => 'portfolio', 'numberposts' => 3));
if ($folioPosts->have_posts()) :
foreach ($folioPosts as $folioPost) :
...