WordPress blog posts not accepting new theme

blurayauthority
blurayauthority used Ask the Experts™
on
Hi there, have a WordPress-based site that works fine.  I installed a new theme and it works just fine, but I've found that I need to go and manually update each and every post (and I've got over 7000 of them) for the new theme to "take hold."

What I want to do is find a way, either via a SQL command or plugin, that will automatically update these posts so that I don't have to do it manually.  I've tried this: http://wordpress.org/plugins/custom-field-bulk-editor/ to no avail.

So you can get a visual, here's a blog post that doesn't look right:
http://64.13.228.218/blu-ray/jaws-blu-ray

Yet if I were to go and "edit" that post (and not actually do anything other than hit the Update button) it'd look like this (below):

http://64.13.228.218/blu-ray/van-helsing-steelbook-blu-ray

Note that the sidebar is now on the left, where I want it and the page title bar and header are also present (part of the theme).

I'm sure there's got to be an easy fix out there, so wanted to ask.  Otherwise I'll spend a few days manually going through 7000 posts.  I don't want to do that.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jason C. LevineDon't talk to me.

Commented:
This shouldn't be happening.  Did the old theme use a specific template for these posts and the new theme doesn't have a matching template?

Author

Commented:
I'm not sure.  I just purchased a new theme and figured/assumed that everything would look the way it does in that new theme's demo site.  And it does..sort of.  I guess I'm just wondering why I have to do things manually and then it works.  My question is: what's that missing "key" that takes place when I manually update a post and what can I do to automate that as opposed to having to do post by post by post...?
Jason C. LevineDon't talk to me.

Commented:
I guess I'm just wondering why I have to do things manually and then it works.  My question is: what's that missing "key" that takes place when I manually update a post

This is just a guess because I can't see the theme folders for oldtheme and newtheme nor do I know exactly how you have everything laid out/set up/plugins/etc but I think oldtheme used a custom template (based on category or post type) to display these posts.  Newtheme doesn't have that template or it's not named properly or something like that.  Editing the post forces something to update in wp-posts or wp-postmeta and snaps the design around.

The more I write above, the more I think that maybe this is a theme settings issue, too. Since you are using a Premium Theme, can you contact the author to see if this is something on their end?
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Author

Commented:
There's a guy (well I assume a guy) who had the exact same problem as me when using the theme.  Here was their response and it worked for him.  Me, not so much.

To do it for all at once take that plugin: http://wordpress.org/plugins/custom-field-bulk-editor/
It let’s you changes multiple custom fields at once.

The needed field name is: pyre_page_title
Set it to the value = yes

So that's where I'm at.  I guess I could take a sample entry and compare the fields with that of one on my new theme and see what, if any differences, there are?

Author

Commented:
Ok, I think I figured something out.  In a post with the "new" layout, there are several (I'd say about a dozen or so) additional custom fields that all start with "pyre_"

So whereas my "old" pages end, the "new" ones like "pyre_page_bg_repeat", "pyre_page_title", "pyre_background_color" and so forth.  

Could I just do an update to all the fields by adding those additional fields?  If so, what would that SQL statement be (I realize you'd need all of the additional custom fields)?

Attached is a sample screen shot of the "old" reviews with that of the "new" reviews.
Old: This is the "old" way, what I want to change.New: This is the "new" reviews, what I want to change it to.
Don't talk to me.
Commented:
That's a really annoying way to manage options...

Could I just do an update to all the fields by adding those additional fields?

Probably not necessary to add ALL of those fields.  I am assuming there is only one that controls the sidebar showing on the left vs. the right.

If so, what would that SQL statement be (I realize you'd need all of the additional custom fields)?

Heck if I know.  In theory it would be a simple statement to loop through a category or custom post type and insert new postmeta using postID, meta_key and the right meta_value.  Something like:

INSERT INTO wp_postmeta ( post_id, meta_key, meta_value )
SELECT wp_posts.ID, "Whatever" AS meta_key, "Whatever" AS meta_value
FROM wp_posts;

Open in new window


The trick will be limiting it to just the right posts.

Author

Commented:
Hey I didn't write the theme, but yes I agree that it's a bit odd that such a highly-regarded theme has something like this as an error.

I think the only field I actually need (and this is what the plugin they mentioned was supposed to do) is the pyre_page_title with a value of "yes" though I'd like to add pyre_sidebar with a value of "default".  I can give that a try and see if it'll work.

All my posts are the same (movie reviews) the only thing that really differentiates them is the category: DVD, HD DVD or Blu-Ray.

Is there a generic postmeta insert statement that I can use:
Insert into wp_postmeta...?
Jason C. LevineDon't talk to me.

Commented:
Is there a generic postmeta insert statement that I can use

Look at my last reply...

Author

Commented:
Yes, but I'm very literal (and not that well-versed in SQL) so can I use that verbatim?  That's to say can I just cut and copy that into my PHP MY Admin and it'll work?  If not, what do I need to do?

Author

Commented:
I modified this SQL statement a bit, but this served as the basis for the answer.  Many thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial