WordPress sidebar to load specific posts

I am building a website in WordPress and I need a sidebar that when you click the name of each post on the sidebar, it loads that specific post in the middle of the page.

I am unsure of how to go about doing this.

Read More

I am new to wordpress and php and any help is appreciated 🙂

Related posts

Leave a Reply

1 comment

  1. Well basically as far as I understood you want to replace the current middle content with post content.

    To do that you will have to use AJAX connection. You will need to pass post id to function, where you will retrieve post data and return it back to the page, where you will need to just insert it in the content.

    I suggest that you check these links –

    http://api.jquery.com/jQuery.ajax/

    http://codex.wordpress.org/AJAX

    Example –

    http://net.tutsplus.com/tutorials/javascript-ajax/uploading-files-with-ajax/

    http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/

    A more simple solution would be just to add the_permalink(); to page link, so it directly links to the post.