Questions tagged [table]
The table tag has no usage guidance.
248
questions
0
votes
1
answer
1k
views
Include custom table in query
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.
Problem is ...
0
votes
3
answers
3k
views
Can I create a table on my DB without creating a plugin?
I have a built in form I created on my WP website .
I want to store the inputs to a table on my DB.
All tutorials that explane how to create a talke include the fact that I have to create a plugin ...
1
vote
0
answers
2k
views
Creating custom database table with crud operation
I am new to wordpress. I going to work on one project that is having 400 pages. Out of that only 3-4 pages are the dynamic pages and rest are the static pages.
What I meant to say by this, most of ...
0
votes
2
answers
1k
views
Loop posts in a table ordered by a custom field value
I'm trying to generate a table for a custom post type events, in which I have a few custom fields, one of these is the date. I want to display the posts in the table and order them by the Date value. ...
0
votes
1
answer
2k
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
1
answer
68
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
0
answers
231
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
2
answers
59
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 = ...
20
votes
2
answers
34k
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
1
answer
409
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
1
answer
137
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
1
answer
604
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
1
answer
614
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
1
answer
3k
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 ...
2
votes
2
answers
2k
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
1
answer
2k
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
1
answer
43
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: ltr;">2</td>...
0
votes
2
answers
780
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
1
answer
3k
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
0
answers
117
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
1
answer
1k
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;
$...
1
vote
2
answers
3k
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
dbDelta($sql)
...
0
votes
1
answer
604
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 ...
1
vote
2
answers
435
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 database....
0
votes
1
answer
613
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
1
answer
35
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 ...
4
votes
1
answer
43k
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
1
answer
419
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
1
answer
574
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 ...
3
votes
2
answers
8k
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 "...
8
votes
3
answers
5k
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
1
answer
1k
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
1
answer
524
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 want....
0
votes
2
answers
178
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 ...
2
votes
1
answer
746
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: http://davejesch.com/...
2
votes
2
answers
5k
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
1
answer
208
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
1
answer
855
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?
Kind ...
7
votes
2
answers
10k
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
0
answers
140
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: http://wordpress.org/...
2
votes
3
answers
5k
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
1
answer
3k
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 ...
0
votes
1
answer
126
views
Create new database through static page code
I want to create a new table in current database of word press through create a static page. I write code for this as below, but there was no result. Why is that, and how can I get this right?
<?...
0
votes
1
answer
766
views
get_var result empty for query of custom table in plugin admin
(There are a lot of related questions to this but none I can find with answers that have worked.)
get_var returns empty when I query a custom table from a custom plugin for multisite. What am I ...
0
votes
2
answers
2k
views
putting wp_query data into html table
I needed to display some data in a simple html table so I started with very basics of table. As shown in the code, the data needed was a list of custom-field-values of a meta_key submitdate, from ...
0
votes
1
answer
8k
views
Specify Table Column Width on a Page
I currently have the following html on my Wordpress page
<table border="5">
<col width="50">
<col width="100">
<tbody>
<tr>
<td>
...
0
votes
1
answer
70
views
Carrying information from button click into form [closed]
I had a question for a project I am finishing for a client. He would like it so that every time a user clicks on "Sign Up Today" for the given workshop (http://yft.ac/upcoming-workshops/), the name of ...
3
votes
2
answers
12k
views
Creating search form for custom database table
I have a custom table in the WP database which I can display fine, with pagination, using the following code:
<?php
global $wpdb;
$rows_per_page = 50;
$current = (intval(get_query_var('paged'))) ?...
0
votes
1
answer
375
views
Table appears in Visual mode of editor but not in preview or after publish
I'm using compare theme and I am facing a problem with the tables. I have created a HTML table, which when I go to Visual mode appears to be correct.
But when I preview/publish it then I don't see ...
3
votes
2
answers
3k
views
Create custom column in post table in wordpress
I want to add two custom field to table wp_posts, and that I need for my plugin. now to enable these fields I have changed core file of wordpress
wordpress/wp-admin/post.php
$data = compact( array( '...