Title: Display wordpress post from javascript
Last modified: August 21, 2016

---

# Display wordpress post from javascript

 *  [loubas](https://wordpress.org/support/users/loubas/)
 * (@loubas)
 * [13 years ago](https://wordpress.org/support/topic/display-wordpress-post-from-javascript/)
 * I want through javascript to display in a div element a post. The post should
   contain all the information as in the single.php of my theme.
 * The information that I have in javascript is the postId and Post title.
 * Is it feasible?
 * Thank you very much!

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [13 years ago](https://wordpress.org/support/topic/display-wordpress-post-from-javascript/#post-3801902)
 * This is probably best handled as an AJAX type request using jQuery $.post(). 
   This means you will also need a PHP action callback function to handle the request
   and return the appropriate content. The content can then be assigned to the div’s.
   innerHTML property.

Viewing 1 replies (of 1 total)

The topic ‘Display wordpress post from javascript’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/display-wordpress-post-from-javascript/#post-3801902)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
