How to modify the structure appended by getPosts( (2 posts)

  1. aleyho
    Posted 6 years ago #

    Hi, i had modified the live form adding a post title field. It's really cool now but there is just a problem when p2 displays the new post, the post title is missing, i need to refresh the page.

    I searched a lot into p2 code and i had found (i think) the structure thati need to modify, "newPosts"

    here it's used for json request (from p2.js):
    ajaxCheckPosts = $.getJSON(queryString, function(newPosts){

    and now it's appended as last post (from p2.js):
    $("#main > ul > li:first").before(newPosts.html);

    i'm freaking out... i can't find were is newPosts located or newPosts.html or were it was created (i think that it's not a file but a jsonobj created somewere).

    If someone will help me i really appreciate.

    p.s. i'm really really really sorry for my horrible english.

  2. dlopeman
    Posted 6 years ago #

    Do you mind sharing HOW you add the post title?

    I believe you will have to modify the functions.php for it to display. I want the TITLE in mine, too... so I'll certainly come across an answer to this eventualy and can share it here.


Topic Closed

This topic has been closed to new replies.

About this Topic