[AJAX] dynamic content (3 posts)

  1. Matsib
    Posted 3 years ago #


    I'm currently struggling with dynamic loading content via ajax. I've search the internet for days now and i was unable to find a solution to implement ajax into wordpress the way i want.

    My goal is "quite simple", have something like this -> http://themeforest.net/item/alliansyresponsive-oneslide-wordpress-theme/full_screen_preview/2611576

    I'd like to load the content of pages via ajax, i don't want to hardcode the content of pages with specific page ID like i do sometimes whith posts (see code below).

    			$array_id = array (post ID here);
    			foreach($array_id as $key => $value)
    				$post_id = get_post($value);
    				$title = $post_id->post_title;
    				$content = $post_id->post_content;
    				<h2> <?php echo $title;?></h2>
    				<p> <?php echo $content;?> </p>

    I'd like to keep the possibility to add new pages without editing each time the index.php.
    I'd also like to have a slide down effect and url rewriting so google can indexed it. And if possible, keep the meta title of the page but i'm not sure it's possible with ajax.

    I knew it will be a big challenge because i'm a webdesigner and not a dev or a javascript dev, but now i'm out of ideas so if anyone has hints or better, a solution i would greatly apreciate it.


    ps: sorry if my english is bad, i'm french.

  2. Sugar Apple
    Posted 3 years ago #

    you can find tutorial and sample ajax theme on digwp.com

  3. Matsib
    Posted 3 years ago #

    Thanks SNSD. I aleady know this site and i found a plugin that does the same thing and in my opion, better.


    it's SEO friendly, hope this helps someone else :]

    now i must found a way to change the fadeIn into a SlideDown :p

Topic Closed

This topic has been closed to new replies.

About this Topic