Can’t update old posts 3.5.2

Background: I’m working on a customers site that I haven’t build myself. The site works pretty ok, when I got it the wp_header and wp_footer was missing and the javascript files were all linked to before the body tag was closed.

WordPress 3.5.2

Read More

Issue: There is this problem with old posts and printing the updated content. The content is printed in a foreach where the attached images of one posts should be displayed. For some reason the old content is stuck there. I can update the post, see the content of the post, but I cant see the new content on the specific place where I’m trying to display it.

The foreach results in a scrolling div that is moving back and forward with the images.

I’ve tried: Repairing the database, to disable all of the plugins, update WordPress and all the plugins.

I don’t have: Access to edit the database.

I would really appreciate some help with this if possible. Been searching for a solution almost a whole day now.

Code:

$bottomSliderImages = get_posts(
    array(
         'numberposts' => -1,
         'post_parent' => 54,     
         'post_status' => 'inherit',
         'post_type' => 'attachment',
         'post_mime_type' => 'image',
         'order' => 'ASC',
         'orderby' => 'menu_order ID'
    )   
);

<?php foreach($bottomSliderImages as $img): ?>
<?php $thumb = wp_get_attachment_image_src($img->ID, '200,94'); 
      if ($img->post_excerpt): ?>
      <a target="_blank" href="<?php echo $img->post_excerpt; ?>"><?php endif; ?>
      <img src="<?php echo $thumb[0]; ?>" alt="<?php echo $img->post_title; ?>" />
<?php if ($img->post_excerpt): ?></a><?php endif; ?>
<?php endforeach; ?>

Related posts

1 comment

  1. So $img->post_excerpt is your content. It is the attachment’s caption field. You must change the images’ captions attached to the post with the id 54 in order to see any changes , if I understood the question right.

    ADD:
    Also attach the images to the post.

Comments are closed.