All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Crate SQL view in WordPress database from custom post types and fields

I'm trying to create a mysql view inside WP database that selects and then show some custom post fields. E.g.: with custom post types Movies and Reviews create an SQL view with movies name, ID and it'...
0
votes
0answers
18 views

Store CPT 'Reviews' average ratings to a WordPress DB table or to a DB custom table?

I am working on this portal in which users can review the services (with description and rating) of a cultural place. BASICALLY, I created two Custom Post Types (CPT) with Pods, one is ...
0
votes
2answers
61 views

How to copy data from a custom field to the post_content?

i used ACF to store post data in custom fields. i'd like to copy the data from a wysiwyg field to post_content into wp_posts table. How can i do this? Roughly: data is on wp_postmeta table, where ...
0
votes
1answer
42 views

Specifying meta field's column type in Database using add_post_meta

In my code, I enhance one of my content types by following code: add_post_meta( $post->ID, 'favourite_fruit_code', $value ) All goes well, but I would like to have power over specifying what a ...
0
votes
0answers
23 views

Is there a way to save different data when USER interacts with the same POST?

I would like a kind of relationship database without create database because I’m not very confident with it. So I think about an alternative using Wordpress default features like posts, categories ...
0
votes
1answer
28 views

How to replicate data storage and querying using Wordpress. Custom posts/fields or Custom db tables?

I am new to Wordpress development but have experience of other dev. I would like to store information that in a more trad setup would mean setting up some tables with primary keys and then a joining ...
0
votes
1answer
166 views

Different Taxonomy Values for Each Post

I'm trying to build a site at the moment that includes the different stores and times that albums will release. I'm not sure how I should structure it with custom taxonomies and custom fields etc. ...
0
votes
0answers
47 views

Confused about where to store my data

I'm fairly new to WP development so please excuse me if my question does not make any sense. I'm trying to develop a plugin and have it (so far) set up and working. I have already registered some ...
2
votes
2answers
313 views

Sanitizing `wp_editor();` Values for Database, Edit, and Display

I'm using custom instances of wp_editor(); to allow rich text editing of Post Meta associated with a Post Object. I'd like to perform much of the same sanitization that occurs with post_content for ...
0
votes
1answer
181 views

Saving Post Data in Another Database

So my problem is: I have a scraping script, who scrapes info and saves it into his own database, when I use that info for my posts, but what I did was copy all info and put it into wp_posts and ...
1
vote
0answers
267 views

Register new user and add custom data row value for it

I have a form in my index.php which requires user email and name. After he submits the form, I save the user to database. User gets saved and can be found on both wp_users and wp_usermeta. Now when ...
2
votes
1answer
54 views

Which is best in the following scenario : post_meta vs custom table vs parent/child posts

I’m looking for a bit of advice on which way to go with a development question. I’m building a community site where subscribers create their own private posts. The data they enter falls into two ...
0
votes
1answer
385 views

Diamond question mark in text after migrating content

I have a weird issue with the diamond question marks for strange symbols in Wordpress. I just migrated my website and content to a new redesigned template. You can see at the bottom of this url what ...
0
votes
1answer
475 views

Get meta_query value by user meta array

This is my code: $type = "pictures"; $args['orderby'] = "post_modified"; $args['order'] = "DESC"; $args['post_type'] = $type; $args['post_status'] = "publish"; $args['meta_query'] = array( array (...
0
votes
2answers
1k views

How to add data to a custom field at the wp_users table?

How to add data to a custom field at the wp_users table? I already add a new field to the wp_users table but I don't know how to add the data to this field I want to use something like add_user_meta. ...
0
votes
1answer
3k views

Custom User Profile Fields

I have add new columns on wp_users and in /wp-admin/user.edit.php I add new fields and connect this to database, so if I put data on the database manually, the new fields recive that, but if I update ...
1
vote
1answer
44 views

Get all posts that do not have a specific custom field without using a subquery

I need to get all posts that do not have a particular custom field, (e.g. custom_field). The following query works fine: SELECT * FROM wp_posts WHERE ID NOT IN (SELECT post_id FROM wp_postmeta WHERE ...
1
vote
2answers
2k views

Default WordPress taxonomy (Tag) - How to add a custom field to form and save it to the database

This adds the field to the add new tag form function tag_add_form_fields ( $taxonomy ){ ?> <div class="form-field term-colorpicker-wrap"> <label for="term-colorpicker">...
0
votes
0answers
19 views

How and when would I implement some code which would take data from one part of the Db and put it in another?

My situation is that I have a display plugin I want to use which can read and display information from custom fields but the information in the custom field is not in the correct format so the plugin'...
2
votes
1answer
465 views

Using posts and postmeta table to store custom Address Book Plugin data

On close inspection of WP, I realize that almost all the information is in the table posts and postmeta. Do you think we should follow this example and put all our information in these table posts &...
0
votes
1answer
616 views

Populate custom post type/custom fields from an external database

I have a custom MySQL DB(same host/different domain) with a lot of vehicle information. What we want to do is populate a custom post type and custom fields with this data so that it's SEO friendly in ...
0
votes
2answers
320 views

Automatically convert standard posts with custom fields to custom post types

I am just beginning a page, and for my current purposes it seems that the only extra things I need are a couple of extra fields for posts of a certain category. Because I only need to add a little ...
1
vote
1answer
44 views

Is there a better way to list all database terms alphabetically?

I have a wordpress site (still in development on my localhost, sorry I can't provide a link) that provides definitions and explanations for common 6th grade math concepts. The main part of the site is ...
0
votes
0answers
151 views

Retrieving and inserting data in custom fields

I need a form which will allow user to add data like name,phone number and email address .This data will be submitted to custom fields i have created using Advanced Custom Fields.I have no idea how do ...
4
votes
1answer
211 views

Right way of storing large number of custom post fields

On one of the sites of my multi-site network; I'm creating a custom post type 'Events'. Each of the 'Events' post will have about 30-50 custom post fields - because we require event creators to enter ...
1
vote
1answer
208 views

Sorting custom post type columns with external data and without meta values

I created a custom post type 'Book', for which data is stored in an external database (like ISBN, author etc). The WordPress database contains the ISBN per custom post, which connects the correct data ...
0
votes
1answer
36 views

I have a form with a custom button ,i want to add the field data to an database when clicking the custom button

So im new to wp/themes,and coding, but love it and love trying to build sites, I used the form from the theme, extracted only the email field and added a button on that field basically inside of that ...
1
vote
1answer
147 views

Custom fields not getting saved in the databse when added to the add new user profile page

I want to save the custom field values in the wp-users table. Do I have to create the fields(client and user_groups) in the table or it gets created automatically when the data gets saved into the ...
-2
votes
1answer
10k views

How to create a searchable database with a single-field search box at the front end? [closed]

I have seen many websites having developed a (hidden) database of their certified clients (actually details of the clients and the given certificates) and they have devoted a web page where clients ...
5
votes
1answer
1k views

So much data in postmeta

Last year started using custom fields and in one year I have 230,540 rows in wp_postmeta table. This year will add more data and new fields and I don't know what to do, to create new table or continue ...
0
votes
1answer
34 views

How to enable the user to add value through the admin panel?

please help me! I have custom posts type 'gallery'. In my custom post type i have custom fields. I added them through the file functions.php. How to enable the user to add value through the admin ...
0
votes
1answer
332 views

update_user_meta(): invisible data storage

I try to customize users profile using this code (from this tutorial) : <?php function extra_user_profile_fields( $user ) { ?> <h3>Autres</h3> <table class="form-table"> ...
0
votes
2answers
1k views

Ideas to connect external database table to wordpress posts as custom field source

I have a custom database table within wordpress database.. I filled this database with data and wordpress posts table with matching ids an example would be... wp-posts table has id - title ...
-1
votes
1answer
34 views

Website that sells statistics

I'm building a website that will have statistics based on user activity on the website (online votes and views etc). People will have to pay to view those stats. I am utilising wodpress features ...
0
votes
1answer
403 views

Populate a select box with data stored in the database?

I know generally how to add custom fields to the user profile page. However, I need to add a custom select box to the profile page that is populated with all the schools in the state. (Our users will ...
0
votes
2answers
741 views

Updating ACF field with external data

For our articles on our Wordpress site, we would like to display article analytics that are collected weekly for each manuscript. We have these native custom fields for each post: Article Views PDF ...
0
votes
2answers
87 views

When creating a metabox do you have to create DB fields for the data?

I'm just getting to grips with metaboxes for the first time and after reading up on them one of the main question i have is do you need to specify fields in the DB to store the data got input. i.e. if ...
0
votes
1answer
1k views

How can I store data from custom fields to custom tables?

I know how to make custom fields for my custom post types. I also know there is the Advanced Custom Fieldsplugin. But I need to know how I can store my custom fields in my custom post type to my ...
1
vote
1answer
169 views

Linking Custom Fields to Database Records

Hey there im fairly new to wordpress and php, but have a strong programming/database background. I recently learned about custom fields and am wondering if it is at all possible to do the following ...
0
votes
1answer
1k views

Add field to user meta table in database when link is clicked

I am working on function that enables registered users on my site to bookmark posts. I have searched for plugins but none seemed to do the job properly. I have a page where users can see their info ...
0
votes
0answers
1k views

Displaying database table in backend of wordpress

So basically I'm working on a job website for a client where they post jobs and users can apply for these jobs with a form that writes to the database with their inputed information.. I have set up a ...
1
vote
0answers
932 views

How to populate custom field dropdown box based on prior selection?

I have two dropdown boxes for a search that uses custom fields and I need the second dropbown box to be populated depending on the results of the first box. So far I have: <form role="search" ...
0
votes
1answer
701 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
1answer
418 views

How do I convert all custom_field php timestamps in the database to js timestamps?

For the past year, we've been storing date-time values into a custom field _date using strtotime(). There are about 100 PHP date-time stamps in our database from over the past year. I would really ...
0
votes
1answer
36 views

Download stuff after filling fields?

is there a way to restrict a download, but if you fill your details get the file? I need to create a database with the names, mails, companies and phones for the people that want to download a ...
0
votes
1answer
42 views

Limit of char count in WP custom fields

does anyone of you know what is the limit of chars count which can be stored in to database via WP custom fields? Let's say that I would want to add to custom field 20 000 chars. Would it be problem?
4
votes
1answer
3k views

Remove old custom field after import

I have imported a set of posts to a new Wordpress install recently. This OLD set of posts had a set of custom fields attached to it (via post_meta using the ACF plugin). The new installation has ...
1
vote
1answer
1k views

Separate table or usermeta

We are creating custom fields for users like annual income, gender, city, country, etc. There are about 10 odd new fields. We will be importing approx. 30,000 records for each user in a month through ...
0
votes
2answers
53 views

What is the best way to store a few fields?

I'm researching what it would take to develop a custom Wordpress plugin. The plugin is a pretty small one. We just need to persist 2 fields of integer information. It's a pretty basic progress bar ...
4
votes
2answers
673 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 ...