[Solved] I am having trouble figuring out what is wrong with this code [closed]


On line #4 you are opening a new PHP block even though the old one hasn’t been closed yet.

You’ll want to delete the preceding <?php on that line. You don’t need it.

Additionally:

You have an extra endwhile; in your else block. The while loop is started and closed within the if ( is_home() ) { block.

The code starting with } else if (is_page() ) { is not in a PHP block. You should either open a <?php block or not close the preceding one.

solved I am having trouble figuring out what is wrong with this code [closed]