We help IT Professionals succeed at work.
Get Started

Display additional post titles on my home page

adrian7474 asked
Last Modified: 2013-12-12
Hi, I am trying to put a div that will list out 10 additional post titles  from the 10 already being displayed on my home page.
Basically, in the reading section of my admin panel, i have the post set to display 10 post. I would like to display the NEXT 10 additional post by title only. (to keep bandwidth and site-load down on my site).
I am experimenting (with the attached code) below the loop in the index.php file in my theme. I was reading the codex page of wordpress, but sadly, my php skills only go so far. I am getting it display the post titles however they are not formatted(listed out) and they are not the 10 additional post, but all of them.
Can someone help me tweak this to work properly?

Also, I read using two loops was bad, so if there is another way to do it, let me know.
// test code for post box
$query = 'posts_per_page=10';

$queryObject = new WP_Query($query);

// The Loop...
if ($queryObject->have_posts()) {
	while ($queryObject->have_posts()) {

Open in new window

Watch Question
This problem has been solved!
Unlock 2 Answers and 8 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE