0
votes
1answer
14 views

wpdb getting avatars and author url

Running an SQL query to pull authors by votes they've received on posts. @bonger helped me out on my first post and helped me get this working great, but I created this new question since it's a ...
0
votes
2answers
65 views

mySQL queries are executed twice on wordpress website

I'm sorry for my english. I'm trying to add some functionalities at my Wordpress website and to do this i have added a function in my function.php theme. The idea is to save in a custom table some ...
0
votes
1answer
31 views

See output of a sql query while plugin installation in wordpress

Doing wordpress plugin development, I am creating a table (while installing the plugin) with the following string: $sql = "CREATE TABLE (query skipped)..."; /*someting*/ For example: I have this ...
0
votes
0answers
65 views

Would manually deleting the dumping data fix a “#1062 - Duplicate entry '1' for key 'PRIMARY'” phpMyAdmin error?

I'm new to PHP! I'm trying to import an SQL database file into myPhpAdmin for a WordPress I'm migrating, but I keep getting this error message: SQL query: `-- -- Dumping data for table ...
0
votes
1answer
47 views

phpMyAdmin displays error when importing database

I'm migrating a WordPress for a friend to a different server. I have already backed up all files and was given a copy of the database by the old server admin. The problem is that when I try and import ...
0
votes
0answers
26 views

Genesis framework comments broken?

I got a really weird problem. Im using a Child theme which using the Genesis framework. I was using Akismet plugin to stop the spammers and it was workin just fine. Recently i just made a comment by ...
0
votes
1answer
43 views

Querying multiple meta_keys in Wordpress SQL query

Here's my Query... I'm looking to narrow this query down to users of one specific role ("meta_key = 'wp_capabilities' AND meta_value = 'employee'")...how do I add that additional conditional to this ...
0
votes
0answers
35 views

On adding new field in post table my all posts not displaying in post section in php wordpress

I have created a module for posts. Now I have to modify this module by adding a new column to it. I have done it and it is working fine on local, but when I upload the code on live server, none of ...
1
vote
0answers
368 views

$wpdb->insert() does not Insert record in a table

I'm trying to understand and get hold of the $wpdb global object but can't seem to make it work. Basically, I'm trying to insert a single record into a custom table in wordpress DB. Instead of ...
0
votes
0answers
71 views

Line break issues with textarea in admin for Attachments

I am not sure if this is an issue with Wordpress, PHP or the Attachments Plugin. I am using the Attachments plugin to save attachments to a post with some meta information. One of which is a caption ...
0
votes
1answer
147 views

How to export database correctly for local to online

This process as a whole is fine... but I seem to have one small issue when I upload the database online. If I create a theme and modify some options that's fine for the local version. Once I upload ...
0
votes
2answers
71 views

How can I order metaboxes in my posts in WordPress?

hello i did add a custem filed and this is my code add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add() { add_meta_box( 'my-meta-box-id', 'المعلومات الرئيسية لفلل مشروع', ...
0
votes
2answers
124 views

count number of user comments with a specific comment meta value

I am using the code below to count the number of comments by a certain user: global $wpdb; $count = $wpdb->get_var( 'SELECT COUNT( comment_id ) FROM '. $wpdb->comments .' ...
0
votes
2answers
116 views

making php value numeric

I used some of this code from this page on Stack Overflow: Using wp_query is it possible to orderby taxonomy? It's about the function to be able to sort a query by a taxonomy value. Although it works ...
0
votes
1answer
187 views

Using color schemes with Color Picker

What I'm doing User interface to change website colors - User can change colors individually (like menu color, footer color, content color), or use color scheme that will change all colors (values ...
0
votes
1answer
357 views

Wordpress SQL JOIN query

Hi Im trying to run 2 querys in the same query call. // send the query global $wpdb; $commentQ = "SELECT * FROM $wpdb->comments " . $whereClause . $orderBy; $comments = ...
0
votes
2answers
285 views

Fetching review value using wpdb class

I'm generating an XML file using PHP for a website where they review tech products. In the XML file, I have to display the rating of products. For rating purposes, I'm using GD Star Rating plugin. ...
0
votes
1answer
412 views

Remove password protection from all posts

So I messed up my blog (QBobble). I had an SQL backup, fortunately, so I reinstalled Wordpress, and imported my SQL database. Unfortunately, it password protected all of my posts. I know that I can ...
0
votes
3answers
129 views

quotes problem in very simple sql

I just simply want to execute a SQL sentence inside of a post (i am using EXEC-PHP widget for that). The problem are the quotes when i want to do something like $my_name='hello' "select * from ...
1
vote
1answer
697 views

Preferred Method of debugging a wordpress SQL calls?

What is your preferred method of debugging Wordpress Applications when writing custom behind-the-scenes SQL calls, etc. ? Coming from a Rails background, I usually tail a log file that displays not ...
0
votes
2answers
415 views

wordpress sql posts query won't display the latest post in a specific category

Hi I tried to display 5 posts titles from a specific category also show the date, but it won't display the most recent one that just published, I had to change the recent post date 2 months so it'd ...
0
votes
2answers
380 views

Display latest post from Wordpress Featured Category that is also in X,Y,or Z categories

I want to display the latest post from a "featured" category (id=1) that may also be in either X category, Y category, or Z category (id=2,3,4 respectively). Note, there are other posts in categories ...
1
vote
1answer
444 views

Importing Geo data into wordpress database

I have a listing wordpress site and want to integrate geo data into the Wordpress MySQL Database for custom search functionality I want to utilize different aspects to create different things... ...
1
vote
1answer
278 views

Detect session/cookie variable in wordpress to prevent access to documents

<?php @session_start(); If (!array_key_exists(‘authed’, $_SESSION)) { include ‘not_authed.inc’; exit(); } // go about your business. ?> and i'm trying to add that to this: ...
2
votes
2answers
2k views

Alter query on edit.php

What's the best way to alter the query being run on the Posts Edit screen (edit.php)? The current method I'm using is by passing an argument to the global $wp_query like so: $wp_query->query( ...