The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

0
votes
1answer
209 views

How can i display a jquery slide on front page

Hy, I integrate a jquery slide on front page, the problem apear when i install Next Gen Galley on the website. The Slide Stop Working, there is a conflict i think. I have 2 header index-header.php - ...
0
votes
1answer
130 views

ERRORS! include() [function.include]: Failed opening

After migrating my site from a development server to the live site, I'm getting a massive amount of PHP errors. None of these were apparent on the development site. http://www.martialartsevents.ca ...
0
votes
1answer
66 views

Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?

I have a function that is designed to do two things: 1) create color picker controls/ settings in the customizer and 2) create a multi-dimensional array $customizeData to be outputted in header styles ...
0
votes
1answer
42 views

Comment_author_url doing nothing

I have this function: <?php function top_comment_authors($amount = 5) { global $wpdb; $results = $wpdb->get_results(' SELECT COUNT(comment_author_email) AS comments_count, ...
0
votes
1answer
668 views

Call to a member function get_row() on a non-object, Unable to use global $wbdp inside a plugin

I am building a custom plugin for my WordPress site. I made a php file called "checkrank" that obtains data from a custom table named "cranking". $uid = $GET['id']; function checkExists($id){ ...
0
votes
2answers
300 views

How to make different custom post layouts?

I am new to wordpress, and have encountered some difficulty in making my own custom layouts. I'm using _S framework (underscore.me) as well as Custom Post Templates plugin. I'm using custom fields ...
0
votes
1answer
199 views

Taxonomy Archive: Display only one post per term from separate custom taxonomy

I am having trouble coming up with a solution for product catalog I am building using custom post types and 4 custom taxonomies. The product catalog is separated by "model", but each "model" can have ...
0
votes
1answer
159 views

Change out put of the_post_thumbnail in PHP

I am brand new to PHP. I've messed with wordpress on it but not really with the code behind it. I am trying to speed up the loading time of our wordpress site but I am having some trouble. PHP uses ...
-1
votes
1answer
4k views

AJAX - Returning Two JSON Objects with One PHP Function

How would I go about returning two JSON objects with one AJAX call and PHP function? Any help is much appreciated! Here's the PHP function: function get_ldap_attr() { header("Content-type: ...
1
vote
0answers
151 views

Query Pages and post excerpts dynamically

I have a custom home page, a blog page which includes a dynamic preview area of the latest 5 blogs, and some other miscellaneous pages. Im trying to design an "events" page where the main page has a ...
0
votes
0answers
41 views

set theme's default slider to show woocommrce's product

we know that theme's slider just can be set to show image of site' category and we can not change it to show image's of woocommerce's categories. there are ways to make a slider to show it. but I'm ...
0
votes
1answer
913 views

Display post thumbnail in foreach loop

I am trying to display a thumbnail in a foreach loop. The thumbnail is a new image size I have added called "plant-thumb". I have all the desired elements displaying properly except for the thumbnail. ...
0
votes
1answer
105 views

!in_array doesnt recognize category

I want to fill an array with categories and tried to prevent duplicates with in_array: if ( $query->have_posts() ) { $categories = array(); while ( $query->have_posts() ) { ...
0
votes
1answer
189 views

Filter unique custom field value based on custom taxonomy category or other custom field

Is there an easy way to obtain a list of uniqye custom fields value from a specified taxonomy value? For example, I have many categories under taxonomy "products". Every product has some custom ...
0
votes
2answers
2k views

Stumped - Ajax Response Returns 0

I can't seem to figure it out. No matter what I do, the ajax call keeps giving a 0 response. I've tested my PHP funtion and it works fine but whenever I call it through ajax I receive nothing (only a ...
0
votes
1answer
117 views

learning OOP with wordpress plugin

I used to develop in functional design so far and I am now learning OOP. I stumbled upon following problem. Sometimes in OOP a function needs to send and argument as an array. Example. I want to ...
-2
votes
1answer
238 views

How to quickly/easily make an analysis (reverse engineering) of Wordpress?

For me Wordpress is totally unknown. I would like to know what tools and techniques do you use to analyze unknown code of Wordpress. If more specifically that for the following tasks: 1. To locate ...
0
votes
2answers
61 views

private functions in plugins

I've developed two plugins in which one function is the same (same name, same functionality). When trying to activate both plugins Wordpress throws an error because it doesn't let me defining the ...
-2
votes
1answer
252 views

How to implement a custom sliding banner? [closed]

I need to make a custom slider with images (same images on all pages) in a template I am crafting for a client. Each of the slides could have a link to one of the pages. How and where should I store ...
0
votes
2answers
46 views

Mixing variables into an array when inserting values

I have a function that inserts a load of values into a database. Not a problem but I have a condition that changes the mysql statement. The problem is is the way wordpress constructs the statement, ...
1
vote
2answers
574 views

Store loop into array

I am using folowing code to store posts ids into array: <?php $args = array( 'post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => ...
0
votes
2answers
539 views

Don't show certain div on front page?

I have CSS issues with a certain div only on the front page (front-page.php). As I can't fix it, I was thinking about removing the item, but only on the front-page. I'm not exactly sure how I have to ...
0
votes
1answer
133 views

call a string/function from database

I need call a string from $_POST["m_giambellino"], etc... (see down), saved in database of wordpress: if ($_POST["send"] == "Save") { update_option("mese_giambellino", ...
1
vote
1answer
686 views

Using get_bloginfo('template_directory') or variable - performance issue

Can I please ask you about the performance of these two approaches in term of execution speed and server load? approach 1: <img src="<?php echo get_bloginfo('template_directory'); ...
0
votes
1answer
151 views

Cron job to call php to email last 24 hours posts

We have been trying to call via CronJob a PHP script that will email the past 24 hours posts using the 'post_type' = 'reservations' filter. <?php query_posts( array( 'post_type' => ...
2
votes
5answers
2k views

Check if current page is the Blog Page

I'm new to Wordpress. I need to check in header file if current page is the Blog Page? I checked but I can't find the way. Help me, Pls.
0
votes
1answer
131 views

Could use some help with Shortcodes

So I am starting with shortcodes and this is my first time trying to make one, I am using it to make css/js tabs for information and basing off code I got from themeforest.. So I will do the best to ...
0
votes
1answer
17 views

How can I tell which of my pages are single-view pages?

I am trying to understand what the is_singular() function does. And I found this definition: is_singular() tag enables you to target single-view pages, regular page pages, and attachment pages But ...
0
votes
2answers
101 views

How to integrate noimage picture in this code

How can i integrate a image if there is no attached image? I'm using this code with success to integrate no-image picture if is no picture is attached to post. <?php if ( ! $img = ...
0
votes
2answers
468 views

How make a php script run only with wp-cron

I have a php script that executes a function and creates an xml file with results. I want this script runs only once daily and i'm using wordpress cron to do this. Problem is this script always runs ...
1
vote
1answer
257 views

How to add date to navigation bar

I've created a new navigation bar on this site: http://www.tomorrowstrends.com/ I'd like to add the date on the right hand side (on the grey menu below the blue one). I thought I could add this to ...
1
vote
1answer
203 views

WordPress Custom Fields (Checkboxes with multiple values)

I am currently using a custom post type, with a custom field that is a checkbox. There are multiple values in the checkbox including: Laptop, New, No-Marketing-text and several more. If ...
0
votes
1answer
32 views

Xml output not places where i want

I have a script that checks status (daily with cron) of some sites and write result in a xml document. Xml is like this : <?xml version="1.0" encoding="UTF-8"?> <xml> <sites> ...
0
votes
1answer
44 views

Attaching images to posts manually (i.e. with custom code, without the use of an API)

I am working on mobile API for a WordPress site. The API is written in PHP and provides methods actions such as creation of a post. Now, I can create a post with one image (thumbnail) of the post. ...
2
votes
1answer
672 views

How do i get (unique) page name?

Like from the page of http://localhost/wordpress/about_us/ how do i get only the "about_us" ? Thanks
0
votes
0answers
32 views

I am trying to call external database recieving error

My case is different from the case defined here .. I am calling an external databse in my functional.php file by this method function newdata() { $newdb = new ...
1
vote
1answer
256 views

Custom profile field with birthday. Troubles with <select>

I made custom profile fields for birthday data. function my_user_field( $user ) { $birthday_day = esc_attr( get_the_author_meta( 'birthday_day', $user->ID ) ); ...
2
votes
2answers
185 views

is there a simple way to list every templates / php files used to generate a specific page?

To customize a theme , it is not always easy to trace every files that are used and find out which one do what . For example i' like to find out how my menu is generated so i can add some conditions ...
1
vote
2answers
40 views

Menu Limitations

I am coming here for advice mainly, because I am stuck on what to do next. Within my latest project, I am using Wordpress at the backbone, as a fully fledged CMS system. I have styled every single ...
0
votes
1answer
132 views

WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]

I have the following function that adds a column in the Sales Log so that I may show the Order Notes. Adding the column is good and showing the id of each item ($item->id) as test is good. Where I am ...
0
votes
2answers
66 views

Javascript not loading on certain page

My Javascript doesn't seem to get called on this page called news, this uses the default post custom type in wordpress. Every other page that uses's this javascript is a custom post type I've ...
1
vote
1answer
137 views

Wordpress PHP plugin - Settings page error

Writing a PHP plugin for Wordpress. It was an external PHP script. But now I'm having a problem. When I click submit on the page it redirects saying there are no permissions to go to that page. Edit: ...
1
vote
2answers
171 views

two columns of posts on homepage, one of them “favorites”

I'm using a child theme of Twenty Twelve in wordpress. Here's where I am developing the site: http://internalcompass.us/castle/ You'll notice the two columns of posts on the homepage. I have one ...
0
votes
1answer
184 views

Location of core code for database connection and get_header

I understand WP well enough to create a custom theme at a basic level, but have no experience with the core code. I've also just finished a book on basic php and mysql coding. I'd like to look 'under ...
1
vote
1answer
89 views

showing 2 prices wholesale and normal

am using the plugin Ignitewoo Wholesale price and have coded the single-product page to show two prices with the idea of one being the wholesale price the other normal retail price but atm its showing ...
0
votes
1answer
1k views

conditional statement for custom taxonomy

Struggling to find out how to achieve this, if it is at all possible. The equivalent of is_category but for a custom taxonomy I've set up. The taxonomy category if which being Taxonomy Name with 2 ...
0
votes
2answers
104 views

JS completely stopped loading but Files are found

Basically I've enqueued all of the files I need and can see there been picked up in the browser but for some reason none of them seem to load or function correctly and I get no errors in the console. ...
2
votes
1answer
106 views

Put a link to a category round a hard coded A HREF

In my footer I have hard coded the links and would like to link some to there category, I could just copy the full URL to it and paste in the href="" but I would rather call it using php. My ...
0
votes
1answer
208 views

Next Previous Post in wordpress with previous / next link with title?

I recently tried the previous post and the next post button link. I do that with image in the left and right side of the site.Its working perfect.But i didn't know how to do this For Example: ...
0
votes
2answers
73 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', 'المعلومات الرئيسية لفلل مشروع', ...