• Hello everyone!

    I was doing some template modifications for a buddy of mine. He created a design concept that required somewhat of a dynamic navigation. So in brief what i want to do is to load the navigation and its content within an AJAX Request from a separate PHP file that echos a well formed HTML, containing the appropriate childs of a certain page.

    Now my question is, how to enable the PHP file to access the get_pages() function from WP. When i load my file as a plugin I can use all the native WP classes and functions but the file is executed everytime I open up a new page within the WP application. And since the file needs to have an “echo” in the end, I always have the output on top of everything.

    And hints for an Ajax and WP beginner how to solve this scenario?

    Thanks a lot!

Viewing 1 replies (of 1 total)
  • Thread Starter keepthingsclean

    (@keepthingsclean)

    Nobody able to help?

    The basic question is, how to access the get_pages() function from a new php file and where to store this file. Is it something that you’d file under “plugin” and how to do it then? Or is it more something that belongs to the theme? How to use it in this case?

Viewing 1 replies (of 1 total)
  • The topic ‘get_pages() together with Ajax’ is closed to new replies.