Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

wordpress post update problem

Options
  • 20-02-2012 5:39pm
    #1
    Registered Users Posts: 1,212 ✭✭✭


    Hi folks,

    I'm having a problem with the homepage on a blog i'm working on. When I add a post, it appears in my archive but won't update on the homepage.

    I'm using a theme called gridnotez.

    The webpage is here.

    Would appreciate any help in this. It's the final step to setting up the blog properly.

    Thanks,
    Beanstalk


Comments

  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    For others - link to the Gridnotez Paper Theme.

    Do you have this working? I see a new post on the home page called "YouTube"
    If not, what are your "Front page displays" settings in the Settings/Reading screen.


  • Registered Users Posts: 1,212 ✭✭✭Beanstalk


    hi thanks for your reply.

    the settings for the front page are fine with regards to wordpress settings.

    QpYZf.png

    I think the conflict comes from a plugin that is already installed on the original theme called timthumb.php. Whenever i add a new post the heading appears but the content is replaced by a post-thumb div and i have no idea why. its really frustrating.


  • Registered Users Posts: 1,212 ✭✭✭Beanstalk


    heres what the content reads once i update a new post:


    </div>

    <div class="post-thumb"><img src="http://online-tv.co.cc/wp-content/themes/gridnotez/timthumb.php?src=nothumb.gif&h=150&w=250&zc=1&quot; alt=" " border="0" /></div>

    </div><!-- END Post --><div class="post">


  • Closed Accounts Posts: 18,268 ✭✭✭✭uck51js9zml2yt


    Beanstalk wrote: »
    hi thanks for your reply.

    the settings for the front page are fine with regards to wordpress settings.

    QpYZf.png

    I think the conflict comes from a plugin that is already installed on the original theme called timthumb.php. Whenever i add a new post the heading appears but the content is replaced by a post-thumb div and i have no idea why. its really frustrating.


    You don't have a post or home page selected.


  • Registered Users Posts: 1,212 ✭✭✭Beanstalk


    but i think thats only if you want a static page. i want the homepage to update with new posts.

    the problem definitely seems to be with timthumb.

    i can get the images working now but the youtube embeds still won't work on the homepage.

    http://online-tv.co.cc/


  • Advertisement
  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    Beanstalk wrote: »
    I think the conflict comes from a plugin that is already installed on the original theme called timthumb.php. Whenever i add a new post the heading appears but the content is replaced by a post-thumb div and i have no idea why. its really frustrating.
    I looked at post.php in the theme. It is displaying the post excerpt (which removes html tags, like the iframe for the YouTube video and truncates the remaining text to the first 55 words), but your post is only the YouTube video html.

    If you are comfortable editing your theme PHP files you could change the following in post.php:
    From:
    [PHP]<?php the_excerpt(); ?>[/PHP]
    to:
    [PHP]<?php the_content(); ?>[/PHP]


  • Registered Users Posts: 1,212 ✭✭✭Beanstalk


    amazing! thank you so much! i can now view the youtube videos and pics, which is class. but the timthumb plugin is still interfering by inserting broken images.

    The problem seems to be that where timthumb can't find a thumbnail it inserts a broken image into the post. this shows up in chrome but not firefox. is there anyway i can remove this broken image and just use the default wordpress image upload for all pics?


  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    Beanstalk wrote: »
    is there anyway i can remove this broken image and just use the default wordpress image upload for all pics?
    The code in post.php will have to be rewritten to see if there is a image before referencing it. I will look at this in the next day or so.


  • Registered Users Posts: 6,501 ✭✭✭daymobrew


    You may have already done this - comment out the post-thumb div in post.php
    From:
    [php]<div class="post-thumb"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo get_thumb() ?>&h=150&w=250&zc=1" alt=" " border="0" /></div>[/php] to [php]<!--<div class="post-thumb"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo get_thumb() ?>&h=150&w=250&zc=1" alt=" " border="0" /></div>-->[/php] It is the simplest solution.
    The get_thumb() code looks for images in a post. It doesn't use the the_post_thumbnail().

    [php]function get_thumb() {
    global $post, $posts;
    $first_img = '';
    ob_start(); ob_end_clean();
    $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
    $first_img = $matches [1] [0];
    if(empty($first_img)){ $first_img = "nothumb.gif"; }
    return $first_img;
    }[/php]


  • Registered Users Posts: 1,212 ✭✭✭Beanstalk


    thanks! so glad to be rid of it!


  • Advertisement
  • Registered Users Posts: 1,212 ✭✭✭Beanstalk


    hey guys just one more query.

    the rss plugin which is built into my wordpress theme appears to be broken? (button link to right side)

    this comes up when i press it

    anybody have a possible solution?

    cheers,
    beanstalk


Advertisement