Migrate existing website to Newsmag

Posted in: Newsmag
Post count: 17

Hi – we’re looking to migrate our large site (10,000+ articles) to Newsmag in the very near future. Slight complication is that for historical reasons we currently use custom fields to insert images and captions (don’t ask!) and do not use featured images either. From here forward we use conventional methods – but will need to modify default single post template to pull in custom fields for images and caption for old articles in the database. Would appreciate any input on how we can ensure a smooth transition.

Kind regards,

Karl

Post count: 9544

Had same issue; we used Auto Post Thumbnail PRO from CodeCanyon; which will generate featured image from first image in the post. Doesn’t help with captions as far as I know. This at least allows the thumbnails to work site wide on indexes and modules. Then leave the setting in theme to NOT use featured image on POSTS, so you don’t have duplicate images at top of pages. Means you cannot use couple of the full width photo layouts, but this is one way to do it.

Or, you could figure out some tricky dbase hack to assign the custom fields to main dbase fields used by WordPress for featured image and importing all the images into the media manager somehow.

This is outside the realm of support for the theme, so you might have to consult a php programmer conversant with advanced hacks to WP dbase.

Post count: 17

Hi Chris – thanks for the tip off re the Auto Post Thumbnail Pro – looks as though it will do what we want. Not too worried about the captions. Also tempted to try editing the default post template to pull in the two custom fields!

Post count: 9544

We also use “thumbnail upscale” plugin to make some of the smaller images a tad bigger, since we had a lot of 300x and 500x images and wanted them to fit 640x sizes. Fun πŸ™‚

And of course “regenerate thumbnails” to get it all working right.

Had couple of ooooooold websites with same issue. The auto post thumbnail pro really saved the day for us. πŸ™‚

Post count: 17

Great info again Chris S – much appreciated! Would love to see a few links to your sites so we can compare notes πŸ™‚

Post count: 17

OK – we’ve started migrating the content – and we’ve edited the loop.single templates to pull in the custom field for the image by adding this just before <?php echo $td_mod_single->get_content();?>:

<table width="300px" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><?php if ( get_post_meta($post->ID, 'Image', true) ) { ?>
ID, "Image", true); ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" width="300px" border="0" style="padding: 0px;" align="centre"/>
<?php } else { ?>
<?php } ?></td>
</tr>
</table>

It’s working fine – but we just have a small, cosmetic formatting issue – the table holding the image is the full width of the page – ideally we want it set as just 300px wide and aligned right – so that the content wraps around the left of the table.

Can you help with necessary css code to achieve this? There are in excess of old 10,000 articles in the database.

This should work fine while we generate new post thumbnails with Auto Post Thumbnail Pro.

Post count: 17

Unfortunately Auto Post Thumbnail Pro didn’t work for us. Our old post images were inserted via custom fields – but the plugin didn’t recognise them πŸ™

Post count: 9544

Well, using basic CSS would be good … “centre” is not a CSS class.

Also using the normal WordPress image classes for alignment might work, too

class=”alignright” ?

The WordPress Codex is a great place to learn about using basic WordPress CSS classes:
http://codex.wordpress.org/Wrapping_Text_Around_Images

  • This reply was modified 11 years by simchris.
Post count: 17

Hi Chris – appreciate that πŸ™‚ Old code that we knew worked was quickly dropped in simply to get an image into the post so we could run auto post thumbnails – but as we now know it doesn’t harvest post images that are inserted via custom fields – so it was deleted πŸ™ Now trying to implement it (properly with CSS) since we can’t easily get around the featured image problem.

  • This reply was modified 11 years by karlos.
Post count: 17

Came across this FREE featured image plugin: https://wordpress.org/support/plugin/quick-featured-images

It saved us a lot of time! Doesn’t (yet) grab featured images from post images in custom filed – but plugin author is working on a premium plugin which will πŸ™‚

Post count: 9544

Nice πŸ™‚

Viewing 11 posts - 1 through 11 (of 11 total)
The forum ‘Newsmag’ is closed to new topics and replies.