• This is my first post on the forum, so I hope I’m posting to the correct place. I mention a plugin, and use a retail theme, but I’m not sure if either one is really the issue that is why I posted here first.

    I am part of a small team working on the migration of a college student newspaper form Joomla 1.5 to WordPress.

    We migrated just under four thousand posts using FG Joomla to WordPress. The importation process was successful in the sense that everything shows up as expected on the front end, but some modifications need to be made to all of the posts in bulk to fit WordPress and the chosen theme better.

    I would like to remove the featured image from the top of each post. I was hoping to make a single database edit to modify value of the relevant field in the database to ‘Off’ for all posts, but when I tried to do this I discovered some strange behavior in my WordPress install.

    For starters the relevant table entries in the wp_postmeta table only exist for posts that I have opened and update manually. I know this because I have opened a post for the first time, hit update, checked the database, and a new entry is clearly visible. Once a post has been updated I can see all of the post’s custom fields and values on the edit post page under ‘Custom Fields’. On top of this featured images are showing up on all posts, but when I open a post to edit it the option to display the featured image is set to ‘Off’, but I have to switch it to ‘On’ and then to ‘Off’ again to remove the featured image from the top of the post. I’m guessing this is because the relevant columns don’t exist in the database…

    I don’t really understand what is going on here. It seems like I somehow need to write a script to force an update of all of the metadata for all posts, but I am not really sure where to begin with this. I guess I could try to write a sql procedure to manually insert a custom field for the featured image into the wp_postmeta for all posts, but I’m not sure if I understand the structure of the data well enough to do this correctly. It would be nice to somehow do comprehensive update off all metadata too.

    There was also a link to the codex at the bottom of the custom fields panel:

    https://codex.www.ads-software.com/Using_Custom_Fields

    Reading over this page I thought maybe I could write a script to use update_post_meta() to force update of metadata for all posts. I’ve done a little work with PHP, but I’m not familiar enough with the structure of WordPress know how to attack this problem.

    Can anyone point me in the right direction?

  • The topic ‘Custom fields not showing up until a post is updated’ is closed to new replies.