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

learn more… | top users | synonyms (1)

0
votes
1answer
374 views

Include a specific post to the query_posts and remove it if it is already in the returned list

Bare with me. Firstly, here is my whole script for my featured slider articles: <div id="featured" class="<?php if ( $responsive ) echo 'flexslider' . $featured_auto_class; else echo ...
0
votes
0answers
5 views

Load php function with AJAX on modal window

On a movie information wordpress theme i am developing, i have an href with text "watch trailer" on each cover of all movies. This brings a modal window, and that is working already, but i want to ...
-1
votes
0answers
9 views

Replace iframe with php for implementing common header/footer

I have a multisite WP and have utilized iframe for common headers and footers. But when pages load on other sites than main there is a delay in loading header and footer. Here is the code I have in ...
3
votes
1answer
27 views

Walker class: Problems with understanding how walk() method can be called without error

I am struggling with understanding how WordPress uses the Walker class. In particular, I don't understand the walk() method (I think). First, let me explain what I understood: When calling ...
1
vote
1answer
39 views

Why use %d in php when in function

$mid = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s", $post_id, $meta_key) ); Can any body tell me why we are using %d and %s ? ...
-1
votes
0answers
7 views

Create an order in WooCommerce using S2Members API and wc_create_order [on hold]

I'm trying to use S2Members 'Payment Notification API' to create an order in WooCommerce when a payment is processed. I'm going to be batch shipping my product once a month to all members who've paid ...
2
votes
3answers
412 views

Dynamically add id to heading tags

How do I add an id attribute dynamically to every heading tag on a wordpress website using php? I wanted to make it so that for every heading tag (h1, h2, h3, h4, h5, h6) I have a unique id attached ...
0
votes
1answer
18 views

how to add number value in front for variable [on hold]

Hi there my question is very simple, is there a way by which we can add a value in the end of the variable a numeric value. like we have a variable $tota $tota1 $tota2 $tota3 each have different ...
0
votes
1answer
1k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
1
vote
1answer
69 views

wp_kses and magic quotes

In the wp_kses codex page it says: You have to remove any slashes from PHP's magic quotes before you call this function. I am new(ish) to PHP and I wiki'd Magic Quotes and it was apparently ...
0
votes
1answer
367 views

Specified file failed upload test. wp_upload_handle

So I managed to write a peice of code that allows me to upload a zip file, im not even sure where it gets uploaded too, and I am doing it on my localhost with apache in control (www-data). the code is ...
1
vote
0answers
26 views

Add / Update Custom Fields After Select Pictures in Media Window

I just added a button called Add Slider in Add/Edit Post Page. Here's my code in my functions.php : //Add button to create slider add_action('media_buttons','add_my_media_button',15); function ...
0
votes
0answers
13 views

Global Signup/Login in two wordpress site some like similar to stackoverflow?

I have two different wordpress installation at two different server one at mydomain.com and other at subdomain.mydomain.com having different database. My question is how I implement global ...
0
votes
0answers
6 views

RSS Error: WP HTTP Error: Could not resolve host: planet.wordpress.org; & all amazon plugins are down

installed wp verson 4-1 rc (release candidate) On my admin dashboard i have noticed that the feeds (other wordpres news, wordpress development blog, and incoming links) are no longer working. ...
0
votes
0answers
5 views

Uploading high ress images: image data does not exist

I have a reason to let users upload High Ress images. My hostingcompany doesn't allow me to upload more then 8MB. To be able to upload more MB's I did the following: I created a php.ini file and ...
0
votes
1answer
21 views

Add bcc to contact from on wordpress

I found a script for making your own contact form in your wordpress site (without plugin) Now, I want to add more clients email accounts as a BCC or CC. how can I do that? This is me code which ...
0
votes
0answers
39 views

How to create WordPress plugins that are closed source? [on hold]

How would someone go about making a WordPress plugin closed source when at the same time the person has to download all the .php scripts to install.
0
votes
1answer
15 views

Use custom get results query to show posts WordPress

I have this code before to show posts. $query_args = array( 'post_type' => 'post', 'posts_per_page' => 4, 'meta_key' => 'Views', ...
1
vote
2answers
28 views

Password protecting content in custom template

I'm trying to password protect content in a custom page template, however when i enter the password i assigned in the backend, it doesn't authenticate, instead just reloads the page upon submission. I ...
0
votes
0answers
21 views

Should I store multiple data in a single wp_post field

I hope this is the right place to ask this question. I have chosen to work in a Wordpress environment so this should apply here. I have to design an application that will store hundreds of thousands ...
-2
votes
0answers
12 views

php code for button counter [closed]

Am trying to run a php code which counts button clicks. It increments to 1 and then it doesn't count. here is my code: <?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $counter = ...
0
votes
2answers
536 views

get_post_custom single array

Is there a way to return single values only when I run get_post_custom($post_id); it seems that I'm receiving double array, even when there only one value for this meta_key
1
vote
1answer
302 views

Getting movie and serial on actor page

I'm building a cinema site, I came with a problem, let me explain: Movies- are stored in Post's Actors- are stored in Post Type - persoane ( taxonomy= lista) Serials - are stored in Post Type - ...
0
votes
0answers
12 views

Create a random list of html items within a shortcode in the functions file.

I'm trying to create a function that randomly pulls lines of code for a list of HTML items. Basically, I'm going to have a list of 50 or 100 images with hyperlinks associated with them. I'd like a ...
0
votes
0answers
14 views

How to create an XML Exporter?

I made an XML Exporter in PHP and then thought it would be really useful as a Wordpress plugin, however I'm having some difficulty as I'm new to Wordpress. I wrote an Exporter in PHP that allowed ...
0
votes
0answers
16 views

Sub-menus are not visible [closed]

I tried adding sub-menus from the menus option on the left hand side. But in the theme it shows only one sub-menu. Why its not showing other submenus ?
0
votes
2answers
414 views

Add Wordpress to Meteor js site

I have a Meteor app that I want to add Wordpress blogging platform to. There doesn't need to be any integration, just: http://example.com/blog/ Anything behind blog/ belongs to WP. How would I go ...
0
votes
0answers
9 views

WooCommerce as a food ordering system? [closed]

I am trying to make a restaurant a ordering system, where as a customer you start adding the first item into the basket, and popup comes up saying which kind of menu or buffet you want (2 meals menu, ...
0
votes
2answers
331 views

Filter custom post types by custom field using AJAX

I have a few custom post types (books, films etc) created with WP-Types. I then have a custom field called Genre, created with ACF. If a user selects "Books" from the dropdown on the frontpage, he ...
0
votes
2answers
401 views

Get unique post in parent category

I have a parent category and several child categories. I also have several posts that belong to the child categories. Each post can be belong to several categories. I want to know how to query the ...
0
votes
1answer
33 views

If else statement to check for thumbnail and whether or not it's a mobile device - streamline

This code works but since my php skills are not so good, I'm trying to learn how I can make this cleaner. This uses php_mobile_detect plugin which I've updated with new classes since the plugin ...
-4
votes
0answers
19 views

Use of undefined constant rand - assumed 'rand' [closed]

Any suggestions to this problem Use of undefined constant rand - assumed 'rand' in /home/naveedsoft/public_html/wp-content/themes/ribbon/single.php on line 35
-1
votes
1answer
25 views

PHP Warning missing Argument 1 for __()

I am getting this error in my server error logs: [Thu Dec 11 10:06:30 2014] [error] [client 11.111.111.111] PHP Warning: Missing argument 1 for __(), called in ...
0
votes
0answers
20 views

wordpress form processing to custom post type not working

I'm trying to insert a custom post type for a multiple image upload form. The below code is the form processing. The page is blank when i submit the form. Where did i go wrong? <?php ...
0
votes
1answer
39 views

Validate Uploaded Image using WordPress' Built-in Functions?

I have a form that allows users to upload an image. I'm using the code below (which currently doesn't work) to ensure what a user uploads is valid. Can someone help me out and either update my code ...
0
votes
3answers
23 views

Wordpress errors with PhP Upgrade

I offered to host my cousin's actor profile website on my web hosting account. He had someone create a wordpress site and store it on my account. It was working fine on PhP 5.2, however my host ...
1
vote
0answers
29 views

curl_exec causes timeout on mod_fcgid

I have a very weird situation on my hands and I cannot understand what is happening. It is a true mystery. I am using a theme called, IpinPro its basically a Pinterest clone. It all works perfectly ...
0
votes
1answer
22 views

Execute php in pages

I need to execute my personal php code in wordpress to print data from a mysql database. I've to execute it only on pages. My idea is to create a file page-pagename.php, copy the body of the page.php ...
1
vote
2answers
33 views

Where should I copy a PHP file from wp-includes to, in order to override it in my child theme?

I've seen plenty of questions about changing stuff inside wp-includes and plenty of answers saying don't, under any circumstances. However, I need to change something that's currently in there! I'm ...
0
votes
1answer
13 views

Get category name from custom loop and echo it once

I have a magazine front page that updates with every issue, and the front page shows the current issue posts which are stickied. So for example, this month all the posts are in a category titlted ...
0
votes
1answer
19 views

Order by in foreach

hello im getting post_id by using wpdb after that i wanna show postmeta(sd_l2) order by their value i uses this codes global $wpdb $top5_ov_performance = $wpdb->get_results("SELECT post_id FROM ...
0
votes
0answers
21 views

increment number for widget identifier [closed]

here's the code I'm using to make a simple custom widget: class test_widget extends WP_Widget { function __construct() { parent::__construct( 'test_widget', 'Test ...
15
votes
4answers
12k views

How to get WordPress Time Zone setting?

Can someone tell me how to get the time zone that is set in the WordPress Admin? For example, if the blog is set to Eastern time, I need this exact string to print out: US/Eastern This is for a ...
4
votes
5answers
14k views

Wordpress refuses to send mail, “…your host may have disabled the mail() function”

I recently implemented a comment area on my website and tried to get the email notification functionality to work. It doesn't seem to want to send email notifications when new comments are made. Just ...
0
votes
2answers
43 views

Passing PHP Variables to AJAX Loaded Pages

I have a blog that shows 9 blogs posts per page, with each additional page of blog posts automatically added using the Infinite Ajax Scroll plugin. Every time a blog post is successfully queried the ...
0
votes
1answer
25 views

Custom HTML structure in wp_list_categories

I am trying to accomplish an Ajax navigation for the categories and for that I need the code to look something like: <ul> <li data-level="1">Parent Category</li> <li ...
0
votes
1answer
21 views

Nested shortCode functions in the functions.php file

I'm trying to get a shortcode function (newStuff) to display inside of another function (oldStuff), but I'm running into trouble. Both shortCode functions are listed below, as well as what I've tried. ...
0
votes
0answers
18 views

get ASC order values from array post meta value [closed]

I am getting the array values like this: $wpjobus_resume_work = get_post_meta($post->ID, 'wpjobus_resume_work',true); after printing them on the screen (by print_r($wpjobus_resume_work)): ...
-2
votes
1answer
215 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
0answers
10 views

outputting WP post title and excerpt into 2 columns and 4 rows within slider

<div class="pul_leftt" style="width: 150px; height: 100px; float: left;"> <a class="pull-left" href="<?php the_permalink(); ?>"> <span ...