4
votes
1answer
93 views

Dealing with Many Meta Values, 30+

I have a "Listing" post type with 30+ meta keys which I feel like can cause a strain on the database when there's 100+ posts. Usually what I do is save each meta value 1 by 1 like so: ...
0
votes
0answers
20 views

Save voting stats with Posts 2 Posts

I am working on a website where I make connections from posts to posts with the Wordpress Posts 2 Posts plugin. Now I want my website users can vote whether they think the 2 connected posts are a good ...
0
votes
0answers
35 views

Mysterious template change after database import/export

When I switch databases from my local environment to the host, some of the pages inexplicably change templates. E.g. there is a custom template "Home" and when I switch the db's it ends up with the ...
0
votes
1answer
145 views

delete duplicate meta_value with same post_id

I've trying to cut down on the time to query a custom post type. After looking at the database and the wp_postmeta table, for some reason, there is some duplicate meta values for the same post_id and ...
0
votes
0answers
90 views

Is it ok to delete empty meta values

I'm using database peek http://wordpress.org/plugins/database-peek/ to show my database structure and have noticed that wp_postmeta has 95073 rows in it. I noticed that a large part of them have ...
2
votes
1answer
120 views

Exporting Data from WordPress into a flat table

I need to be able to export the data within WordPress so that each object is contained in a single row, like a flat table. Imagine each post type as it's own database table, containing columns that ...
1
vote
1answer
89 views

Is it possible to store visitors IPs in wp_postmeta table?

Or in any of the other 11 Wordpress tables. I also need to store: submission date, name, contact number in the same table. What approach would be best? A custom table or using a standard table?
0
votes
1answer
39 views

Recommended Post Structure for DB Storage

I'm trying to write a plugin that would help my local little league manage their league, and though I've read the New Table vs Post Meta question, it's still a bit unclear and I'm hoping someone here ...
0
votes
1answer
108 views

Saving zero as meta value

I have a meta_key called "_ordre" and each time I create a new custom post, a new meta_value is set for that meta_key. The thing is, when I set the value of '_ordre' to 0, the meta_value is not saved ...
4
votes
1answer
352 views

What is the advantage of the wp_options design pattern?

As we all know, a design pattern that is used frequently in Wordpress' DB code is the idea of persisting data for a particular object (blog/post/comment), indexed with a particular name or key. We ...
1
vote
1answer
144 views

Importing Data from a Non-WordPress database, into WP

I'm migrating data from a totally different database style into WP. The main issue I'm trying to wrap my head around is how to import any meta data, given that WP uses a key value pair style for meta ...
2
votes
2answers
249 views

What is an efficient way to query based on post_meta?

The problem I am having is when I allow users to filter posts it overpowers the database and things run extremely slow. I am unsure what the best way to query posts using meta values is. My site has a ...
0
votes
2answers
210 views

Does post_meta data need to be unserialzed?

Is it possible to unserialize data in the mysql query at the run time? i don't want to use unserialize() function of php. I need to fetch the value "mathematics" from the below serialized value ...
1
vote
1answer
237 views

One post carries 30 postmeta values, is this too much?

I have some data saved as post meta, occasionally some plugins may save an extra piece. Now I installed bbpress, it saves at least 10 pieces of post meta. Adding them together, there are nearly 35 ...
3
votes
2answers
1k views

Custom Post Type with Input fields to seperate table on database.

At the moment I'm using a custom post type called 'locations' I would like to be able to put input fields into the custom post type that would store the information such as ( address, type, phone ...
0
votes
1answer
114 views

Say I have a tech blog, how best would I store technical specs for a phone, if i use custom post types

I've been playing around with WordPress for a couple of months now and when a client requests that he/she be allowed to modify, add content without my intervention, my defacto standard is WordPress. ...
4
votes
1answer
226 views

What is the most secure way to store post meta data in WP?

Sony's recent security "holes" showed how unsafe it can be to store data unencrypted. As some of you may know, I 'm working on re-releasing the free CRM theme Driftwood. What is the most secure way ...
3
votes
1answer
997 views

importing data from non-wordpress mysql db

I have created an import file to get the articles from a non-wordpress db and bring them in as posts in wordpress, I am not sure how to bring over the thumbnail image into my custom field I defined as ...
1
vote
2answers
494 views

delete post meta from db, even if does not exist?

it is not the first i see that we "delete" a post meta even if it does not exist : example : $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; ...
3
votes
2answers
3k views

How to delete outdated, wrongly sized images in _wp_attachment_metadata?

I've got several custom image sizes for my blog. One of these is setup as add_image_size( 'slide', 640, 290, true );. These are used in a header slideshow. My problem is I've upped the dimensions of ...
0
votes
2answers
668 views

Remove “%” from strings in serialized arrays in wp_postmeta

In the course of converting a blog from Blogger to WP and running a script to grab hot-linked images for hosting, I ended up with some funky images names like act%252Bapandas-210x290.png These ...
0
votes
3answers
424 views

Uknown meta entries in wp_postmeta

I'm working on a site that has been running for few years and had different maintainers so it's kind of a mess. What I found weird is a lot of entries in wp_postmeta where all the keys are numeric and ...
13
votes
4answers
6k views

Post meta vs separate database tables

When developing plugins that requires data storage, what's the pros and cons of using one method or another ? The explanation given in the codex is not detailed: Before jumping in with a whole ...
1
vote
1answer
157 views

Routine to convert custom post meta from old to new value

I have two custom post meta objects that have been applied to all pages and posts in my sites. The names are MyCustomHeader and MyCustomTitle and I have one of these assigned to each post and page in ...