Using The Loop on external page
-
I have a wordpress blog installed at https://www.domainname.com/blog. And I want recent post headlines, and an excerpt to show on the main page of my site, outside of that blog directory. I’m trying to use The Loop, but it doesn’t seem to understand it outside of the blog itself.
Can The Loop be used outside of the blog directory? Is there a way I can tell the main page, or any page for that matter, where to look so it can understand the functions and variables used inside The Loop. I see plenty of sites out there showing blog posts on their main page, but I can’t figure out how they’re doing it.
The error I’m getting right now on my page is “Fatal error: Call to undefined function have_posts() in /var/www/html/domainname.com/www-dev/index.php on line 299”
Can somebody please send me in the right direction. My last post was completely ignored.
Thank you, Thank you
- The topic ‘Using The Loop on external page’ is closed to new replies.