The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
15 views

how to create table during plugin installation in side a class

I am creating oop base plugin. So how to create table during plugin installation in side a class.But I could not create table. This is my approach.What wrong with me. class Notification { ...
0
votes
1answer
31 views

MySQL swap one table for another?

So I have a situation with this WordPress site I'm doing where I have to swap the positions of my featured images. I have two per post thanks to the Multiple Post Thumbnails plugin, but now whatever ...
0
votes
0answers
33 views

Query post by meta key of another table

Im using event calendar plugin where I can set event date for posts and it shows in calendar widget. Everything is working as inteded but I would also like to query post by event date. I know how to ...
0
votes
2answers
27 views

Table is not created in WAMP

I don't know where the mistake is. My code is not creating a table in WAMP: function subscribe_table() { global $wpdb; $table_name = $wpdb->prefix.'_databasesubs'; $charset_collate = ...
7
votes
2answers
181 views

Is it mandatory to use $wpdb->prefix in custom tables

Sorry if this question is trivial. I'm just beginning to develop plugins in WordPress. In all the tutorials I found this: while creating the custom tables, $wpdb->prefix is used. Example: ...
0
votes
1answer
10 views

dbDelta not installing database

I'm not sure why this isn't running. When I output dbDelta it says that it created the table, but it doesn't. I think my SQL is valid. Taking everything out between id and UNIQUE KEY results in the ...
0
votes
1answer
35 views

Use members from 1 site on another one

I have two different wordpress installations and want to use the same users, I have Site_A with all the users logins with buddypress and bbpress, Site_B will be capable of letting the users from ...
0
votes
0answers
128 views

Google does not index data from custom table used for a plugin

I've got an online shop plugin (made on my own) which uses custom tables for storing data about products. For list of product and for product detail I created WordPress pages and used shortcode to ...
0
votes
1answer
39 views

Plugin does not create a custom table upon activation

I have a problem as the title says. My plugin does not create a custom table when it's activated. My code is: function bsp_create_update_table() { global $wpdb; //geting the acces to a wp tables ...
0
votes
0answers
19 views

make custom user table column searchable

I created a new meta value on registration and have it added to the profile as well as displayed on the user list as a column. But when I search the user table with the value it doesn't return the ...
0
votes
1answer
88 views

Can i set css class for table via TinyMCE [closed]

I'm using TinyMCE plugin. And now i need to set css class for table. I found some info on http://www.tinymce.com/wiki.php/Configuration:table_class_list . But how can i apply it in TinyMCE plugin for ...
0
votes
0answers
21 views

Join custom tables

i am wondering if it possible to create two custom tables in wordpress which are related? I have found out that that FOREIGN KEY can not be used, so is is possible at all?
0
votes
0answers
16 views

looping thru custom table, and sorting by usr_id and date

so for the last months i've been learning my self basic php, and javascript. and as so many before me i've hit a brick wall at foreach so i hope there is a nice guy in here who willing to set a ...
1
vote
2answers
30 views

how to change appearence of the content of default post list columns?

Speaking about backoffice here. I usually add columns and filters to the backoffice for certain custom post types. No problem here. BUt what if I would simply like to change something on the content ...
0
votes
1answer
41 views

dbDelta not creating tables with composite keys

I've been trying to figure this one out for 3 days now, reading every reference on dbDelta I can find. My ultimate goal is to create a table of unique ad_id, ad_trigger pairs. This does not create a ...
0
votes
1answer
13 views

How to avoid repeating similar properties for all tds of a table in a wordpress post

Consider the following table. <table> <tbody> <tr> <td style="text-align: right; direction: ltr;">1</td> <td style="text-align: right; direction: ...
0
votes
0answers
55 views

Woocomerce - create Make-Model-Year dynamic dropdown filter

I'm going to create a Make-Model-Year dynamic filter for Woocommerce products. I'm trying to decide, if I should use hierarchical taxonomies and tax-query for this, or create a custom table and use ...
0
votes
2answers
75 views

Add pagination to table generated by wp_query

I spent hours trying to find a solution to this, but I am not able to figure it out. I have a table that shows user's data and I am trying to add pagination to it. I have tried by adding "paged" in ...
0
votes
1answer
117 views

Creating a search form and displaying results

Im trying to create a plugin for a site where the user can see a table of orders from customers in the Wordpress dashboard, It's a custom db but I'm using the wp-list-table, I've wrecked my brain for ...
1
vote
0answers
67 views

Pull data and display as rows and columns

I am a noob when it comes to pulling data from tables and fields of a WP database so I'll explain it as best as I can without it running into a thesis. I have a table called WP_answer. In that table ...
0
votes
1answer
96 views

Wordpress admin Tables use to display own data - In admin WP

I want to display results in a table. Is it possible to use the wordpress tables like the one in the post and page section which shows all posts and pages in the admin section. global $wpdb; ...
0
votes
0answers
12 views

Adding searchable tables [duplicate]

I have a table not included in Wordpress tables' schema, and I want the option to include this table so that any search in the Wordpress search field will search and yield results from this table as ...
0
votes
0answers
28 views

Display Pagination on Table

I have written the code below: <?php $ListTransfer = $pwtw_db_connect->get_results ( $pwtw_db_connect->prepare ( 'SELECT * FROM donation_bank WHERE trans_wp_id = %d AND trans_svr_region = ...
1
vote
2answers
213 views

Creating table with plugin is not working

After reading many question and answers and many had asked the same question I have been following the same instruction as the people instructed but my bad it's not working I have used ...
0
votes
0answers
78 views

Unable to create custom table , register_activation_hook from class

Cannot create the table , what am i missing class em_db { public function em_events_custom_table() { global $wpdb; $table_name = $wpdb->prefix . "em_events_db"; ...
0
votes
0answers
42 views

Delete entry from DB

i created plugin and now i want to add delete button, that user can delete one entry from DB table.. Here is my code i form.. function showresult(){ ?> <form method="post" ...
0
votes
1answer
111 views

Insert double entry in DB

I created plugin and my plugin create new Table in DB. My problem is when user type something in field firstname, lastname... and click on button Submit, that go to my table and that is ok.. but then ...
0
votes
0answers
66 views

How to clean tables after plugins are uninstalled

A number of plugins which I use earlier are not uninstalled and there tables are still there. I don't know the table names created by those plugins. Is there a way to automatically delete (via a ...
0
votes
2answers
132 views

Multiple instance of data in plugin custom database table on plugin activation

I'm creating a plugin that adds some data to a custom table created by my plugin on plugin activations. I also created a settings page with a form that users can insert their own data to the ...
0
votes
1answer
93 views

Creating a Restaurant Menu

I have an html menu on a site for a client. I'm trying to transition it to WP so he can edit it. I'm having trouble with the menu. Here's an image to show my current setup. I assume this can be ...
0
votes
0answers
54 views

Data for WP_List_Table

I have a problem displaying data in a table for WP_List_Table class. I query my database this way: $data = $wpdb->get_results( 'SELECT * FROM wp_prijavljena_lica ',ARRAY_A); I have an array ...
0
votes
1answer
29 views

Should I use an additional column in the DB?

I'm building a site for a client. They need a functionality where WordPress can tell if a logged in user has viewed a post in order that they might serve a notice or hide the original content. I ...
0
votes
1answer
964 views

How To Make Connection To WordPress Data Base In A Plugin?

I am learning Plugins and I am trying to connect WordPress database wp-config.php in my Plugin PHP code. Currently for checking my code, I used the below connection and it is working fine. Now I ...
1
vote
1answer
38 views

Obtaining user table for one site on multisite set up

I'm trying to select only users that are registered for a specific site on my multisite set up and see that the table for the users has collected everyone that is on the network. Is there away I can ...
-2
votes
1answer
75 views

When is it OK to create a custom table for a plugin? [duplicate]

A while ago I wrote a question asking about storing easily queryable data associated with a given attachment. The recommendation that I received at the time was that I should avoid using the WP ...
0
votes
0answers
24 views

How do I create a system to track logged in users' views each time an individual CPT post is viewed?

I have a custom post type created in a plugin I'm working on, using Piklist (as I have a lot of other things I can use it for in this project, in general). So my first step would be to create a table ...
2
votes
2answers
2k views

Save custom post type in different table

I need to store custom post type post data into a custom table, not in wp_posts and wp_postmeta. Is it possible? anyone help please. Actually, I have created two custom post type named "truck" and ...
0
votes
0answers
371 views

Set up dataTables row delete rather than php and page refresh

I am using the dataTables jQuery plugin to display a table in a wordpress site with data from a custom table and it works well. I have added select check boxes and once a row or rows have been ...
0
votes
1answer
352 views

Removing filter dropdown in posts table (in this case Yoast SEO)

I don’t need Yoast SEO meta box for one post type so I removed it with remove_meta_box(). Removed unneeded columns in post table by unsetting columns with manage_edit-custom_post_columns, but drop ...
0
votes
1answer
115 views

Search Query that Includes Custom Table

I have a WordPress website that grabs product data from a custom table. I would like to be able to also search from fields in the custom table. Could someone provide a sample query of what this would ...
0
votes
1answer
187 views

Display single post inside accordion based on form submission results

*Note - for full background see previous question here: http://bit.ly/1gaF673 Ok, so after fixing the problem above and a couple of issues that followed. My form submission returns the results I ...
0
votes
2answers
54 views

Database custom table issues - incorrect result displayed

First things first: I've spent most of today going over these forums; the stackoverflow forums; the php.net manual; and a bunch of random sites I found through Google Search - so, if I've missed the ...
1
vote
1answer
123 views

Custom fields on a virtual page

I've used Dave Jesch's solution for making virtual pages (from content temporarily saved in a custom database table, updated from an RSS every four hours). See more here: ...
2
votes
2answers
977 views

Should I global $wpdb outside of any of my plugin's functions scope?

I know that the general advice to global variables is to not use them at all. Still, when doing something with the Wordpress database, it is required to do global $wpdb; to access the methods ...
0
votes
1answer
136 views

MailPress plugin: table inline style tag removed when sending the newsletter

I have coded my own MailPress theme for my newsletter using tables and inline styling for good look and feel of my newsletter. I have in the files header.php and footer.php html table code with inline ...
0
votes
0answers
183 views

wp-admin: Sort users by surname

Is it possible to alter this table in the backend so I can sort users by Name and Surname? I have dozens of users on my multisite that need to be sorted by Surname. Can anyone help me out here? ...
5
votes
2answers
1k views

What for is the table “wp_commentmeta” exactly?

I have been reading about the Database Description of Wordpress. I haven't understood the meaning to the use of the table wp_commentmeta. The documentation says: Each comment features information ...
1
vote
0answers
64 views

Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?

After WP3.8.1 upgraded, two plugins I made for my networks both stopped working. Each runs on a separate multisite install. I posted the error report on the Wordpress form: ...
0
votes
2answers
473 views

How to insert more than one row of data into a table at one time

I would like to populate a custom table, with more than one row of data at one time. If I delete the second array, it will insert one row of data. It won't add both rows at the same time though. How ...
0
votes
1answer
372 views

How to populate custom tables with rows of data

I'm trying to populate a custom table called countries, with two rows of data. The custom table is created when the plugin is activated. The rows need to be added when the plugin is activated. The ...