Support » Themes and Templates » [AJAX] dynamic content

  • Hello,

    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 ->

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[AJAX] dynamic content’ is closed to new replies.