• Got a problem. I’m in the process of creating this one page site and the idea is when you click on one of the links in the submenu, a div is supposed to slide down and content coming from one of the pages I created in wp-admin is supposed to appear in it. I’m using jQuery .slide to do that. So how can I make it where content dynamically appears in that div depending on what is clicked? Any ideas welcome.

Viewing 1 replies (of 1 total)
  • There are several ways you could do this. You might take a look at some of the AJAX plugins in the WordPress plugins directory. I just saw this one and I know I’ve seen some others in the past too.
    http://wordpress.org/plugins/ajax-content-renderer/

    You can also use the admin-ajax.php file as described here:
    http://wordpress.org/support/topic/load-wordpress-post-content-into-div-using-ajax?replies=2

    Otherwise, you could try creating a page template without the get_header(), get_sidebar(), and get_footer() calls in it and just include the WordPress code that loads and formats the content of the post. You’d have to pick a page to assign that template to and then run your AJAX calls to fetch content through that.

    Unless you get lucky with one of the off the shelf AJAX plugins, though, you’re probably going to have to get your hands dirty with with some jQuery and JavaScript, though.

Viewing 1 replies (of 1 total)
  • The topic ‘Looking for a way to load page content into a div on the homepage’ is closed to new replies.