adding custom loop and getting errors
-
I am nearly finished building the site I am working on. The design requires individual pages to be designed differently, with a custom loop that will display page specific content along with the normal running loop on the side that will continue to display the last 10 to 20 posts. For example: The page marked Garden will have all posts relating to garden in the center portion of the site, while the most recent posts continue to run on the right side of the page. The same will be true of each of the pages.
What I am having trouble with is that every time I try to make a custom loop I get a parse error returned to me.
I have followed to the letter, not one, but 5 different videos, tutorials, and articles describing how to do this.
I have tried putting wp_query markup in both the page.php and the functions.php folder, both simultaneously and individually, and I keep getting messages like “unnecessary ‘}’ or “unnecessary ‘,'”. However, when these offending symbols are removed, the next letter, word, or symbol just takes its place as the “unnecessary” feature until I end up having to delete everything I have just done.
I know I must tweak what tutorials show me for my own needs (aka rename queries etc. after my own content) but even when I retool the entire site to have files and names exactly like those in the tutorials, I still can’t keep the error messages from popping up!
I am trying to edit the templates themselves, and yes, I know, child themes are better, but this, I believe, was an unavoidable challenge I had to tackle.
I do also realize that simply using page.php will not be sufficient in the long run for what I need, but there’s no sense in creating specific pages when I can’t even get one to do what I want it to.
Furthermore, I am working out of the html5blank theme and wondered if there was something amiss in the theme that could be preventing me from doing this, but I’ve checked each page, and especially the functions.php page many times to see if there was a preexisting query that might be overriding this, but I see none.
I’m at my wits end. I’m so close to being done and yet I’ve been stumped on this problem for nearly a month. I have not included code here, because I have tried so many different ways of doing this, but if someone has an idea, I will be happy to cough up any code he/she would need to help me with this problem!
Thanks ahead of time!
- The topic ‘adding custom loop and getting errors’ is closed to new replies.