Grow your CSS skills. Land your dream job.

WordPress issue ( Advanced )

  • # December 25, 2012 at 3:50 am

    I am trying to make a theme where all the content is loaded into the page by a jquery animation. I have it working but ran into some issue that I can’t figure out.

    For some reason, when I try to load a page using page.php. Instead of getting the page content, it pulls the first post from the uncategorized category. That “Welcome to WordPress” post. It should pull the page content but isn’t. I am using the 2012 method of making a theme. So in page.php, I have this content

    http://pastebin.com/g4HZskkD

    You will notice that on line 2, there is a li tag with $nav_id. The point to the li tag is that the jquery that handles the animation uses an ul to store all the data. The variable in the li tag gets the id of the navigation. So each navigation to a page or post will be the title of the page or post. So the li tag has to match the href. This is working. My index page has this code

    http://pastebin.com/1bTiUH8i

    I did not right the code in index.php. I have modified it to work for my purposes. I don’t fully understand all of it. It does do what It should do. If it’s a template, it loads the template. if it’s a page, it loads page.php. My only issue is that page.php is showing post data instead of page data.

    You can view the development theme here http://www.rc-hc.com/mafloral/

    This is a band template. If you click the TEST PAGE link in the navigation, you will see that it loads the first default “Welcome to wordpress” post. It should not load that, it should load a page. I think the code here is what is doing it but I didn’t write this code and can’t figure out what is causing it. What I am trying to figure out in the code below is what part is being excluded in get_pages

    http://pastebin.com/g4HZskkD

    Can you help?

    Thank you for your time.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".