Forums

Using wp-query on a external page (2 posts)

  1. Arjen2004
    Member
    Posted 2 years ago #

    I have a wordpress blog and a portfolio website. I want some posts to appear on my portfolio website. There for i have written a simple wp-query:

    $my_query = new WP_Query('cat=4&showposts=3');
    while ($my_query->have_posts()) : $my_query->the_post();

    The information of this Query has to appear in a "json.php file" that's in the portfolio website.

    How do i get the external page to recognise the "$my_query" ?

    (the blog and the portfolio website are on the same server)

    Thanks in advance

  2. MichaelH
    Volunteer
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic