• loubas

    (@loubas)


    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

    (@bcworkz)

    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.