Forums

[resolved] autofocus theme together with tweetpress plugin problem (2 posts)

  1. Regenwolke
    Member
    Posted 2 months ago #

    Hi,

    i am trying to use AutoFocus together with the plugin TweetPress. In TweetPress every uploaded image is stored automatically in the Gallery without having its own article, so it does not appear in the AutoFocus View. Is there any way around it, so i could use both together?

    If you like to have a look how it looks at the moment, go to: http://ortb.de

    At first you see the images uploaded via TweetPress, whereafter the two “AutoFocus” article based images are shown.

    Looking forward to hear any idea about it from someone of you.

    Cheers

    Jens

  2. Regenwolke
    Member
    Posted 2 months ago #

    I somehow solved that myself.

    The problem is, that TweetPress does not create a post for every image it uploads.

    So what i did is, insert this code inside tweetpress.php:

    // Create post object
    $my_post = array();
    $my_post['post_title'] = "";
    $my_post['post_content'] = $_POST['message'].'<img class='.'"'."alignnone size-medium wp-image-10".'"'." src=".'"'.$imageurl.'"'."/>";
    $my_post['post_status'] = "publish";
    // Insert the post into the database
    wp_insert_post( $my_post );

    and voila, every TweetPress image has a post with an URL to the image, so autofocus will find it.

    Still some tweaking to go, but what i am looking for is there ;-)

    Maybe someone of you could use it as well

    Best

    Jens

Reply

You must log in to post.

About this Topic