Forums

xmlrpc not recognizing blog_id (5 posts)

  1. ericnobl
    Member
    Posted 2 months ago #

    I'm relatively new to all this, but I've used some xmlrpc funcions with my wordpress installation on other pages on my website.

    Now I'm having a problem with wp.getPages. The first arg for this function is the integer $blog_id. But when I use my $blog_id, all I get is the introductory post from when I set up. None of my own posts are listed. When I try the same thing with wp.getPage it says the page doesn't exist.

    As a sanity check I tried wp.getUsersBlogs, and it says my $blog_id is 1, which is the number I was using.

    (The examples I've used before list the args in single quotes separated by commas, but I've tried it with and without quotes with the same effect.)

  2. josephscott
    Member
    Posted 2 months ago #

    Currently WP ignores the blog_id provided by the client.

  3. ericnobl
    Member
    Posted 2 months ago #

    Thanks, josephscott, that would explain why it doesn't seem to make any difference which value I put in for blog_id.

    So I guess I have a different question: why does 'metaWeblog.getRecentPosts' get my recent posts, but 'wp.getPages' only gets the one "welcome" post from Wordpress and none of mine?

    I was hoping it was a blog_id issue, but I'm out of ideas now.

  4. josephscott
    Member
    Posted 2 months ago #

    I double checked the code for the wp.getPages method, it should return all of the Pages on your blog (exactly how many depends on the 4th parameter, which defaults to 10 if none is provided).

    Note that wp.getPages doesn't not return Posts, it returns Pages.

  5. ericnobl
    Member
    Posted 2 months ago #

    Thanks for the explanation; I was using the wrong function and the main page defaults to the intro post.

Reply

You must log in to post.

About this Topic