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

learn more… | top users | synonyms (1)

0
votes
0answers
5 views

How to trigger WooCommerce order complete email?

I want to be able to trigger the WooCommerce order complete email at a different stage in the WooCommerce checkout process. So I've disabled WooCommerce order complete email from the backend and am ...
0
votes
2answers
23 views

Inserting dynamic content into a page

I see this subject comes up regularly but have not seen an answer to my specific requirement yet. I'm trying to use a WordPress page as a template and insert database-sourced content (about 20 or so ...
0
votes
1answer
13 views

add custom tags for custom post type in wordpress

I have many custom post type and I want two of them to be relate by tags. These tags are only useable to these two custom post type only. like I have two custom post type 1. books 2. writer and I ...
0
votes
0answers
10 views

Gravity forms plugins image upload code [on hold]

I want to change dpi of an uploaded image before uploading that image and before saving into database.
0
votes
1answer
15 views

Trying to run website a php file is blank

I have a local copy of a website I am working on and I just found that the index.php files are almost empty. They contain only an opening php tag followed by a commend that says: "Silience is golden." ...
0
votes
0answers
14 views

shipping method problem with woocommerce [on hold]

i have a wordpress with woocommerce , i have three different shipping method -free shipping - flat rate -local pickup now my problem is on every product after go in checkout or cart not show the ...
4
votes
2answers
220 views

Why do you need to wrap a function inside array($this, function)

I'm a newbie at PHP and wordpress so please be gentle! I'm building a plugin - following a few tutorials, getting it all working. My question is why is the function I want to call wrapped up in the ...
0
votes
1answer
19 views

Advanced Custom Fields not displaying

my php skills are pretty limited and I am pretty much stuck with the following issue. Why is my Custom Field (placed at the bottom) not showing up after the posts blocks? Here is what my code looks ...
0
votes
1answer
31 views

Get all taxonomies for all post types

I would like to get all the available taxonomy for each (custom) post type. My aim is to list for each post type, each taxonomy like category, tag and for each of these taxonomy to get all register ...
0
votes
1answer
11 views

get_term_link() returns correct - But illogical error-messages disturb

I've a really strange issue with Wordpress and the get_the_link()-function and a following issue with objects who are objects, but identified as non-object-error, itself they are working. First the ...
1
vote
1answer
22 views

Get posts with at least one category in common with current post?

In single.php : I want to get all posts with at least one category in common with the current post. I tried reading through the wordpress codex documentation but I found it rather confusing (I'm ...
-2
votes
0answers
9 views

Add some text after a specific post

I have a blog where 20 posts are appearing. I am using twenty fifteen theme. I want to add some text after 4th number post and then 8th, 12th and 16th.
0
votes
0answers
10 views

MailPoet Plugin - checkbox not showing up on registration form [on hold]

I have selected "subscribe in registration form" in the MailPoet settings, but the checkbox is not showing up on my site's registration form. This is a custom theme - what might be happening to ...
0
votes
1answer
26 views

Ajax button not working

So i'm trying to make a follow button in wp, and for some reason the ajax button isn't working right. Here are the steps of what's supposed to happen user clicks #followbtn Ajax goes to $_POST ...
0
votes
1answer
16 views

How to refresh a template page on Wordpress in 3 seconds - easiest method?

Basically, on my site I have content submitted via a search bar. I'm using a content-none template to detect if the user is signed in - and if so it submits a post programmatically (if the post ...
0
votes
1answer
19 views

How to call a certain object/menubar in a PHP file

I made a template and had some help with adding a CSS file to the template. Now I'm stuck on the question, how do I add a certain menubar to my header. Example: topbar - has menu with "Welcome ...
0
votes
2answers
34 views

How to add new CSS file to new PHP file

I've made a new template file for Wordpress constructing the elements of the page via PHP and Wordpress recognizes the template as such. Then I wanted to include a CSS file for said template (same ...
0
votes
0answers
10 views

How to use redux options in wp-admin? wordpress [on hold]

I can use redux framework options for front-end eleemnts. Now lets say if i want to change the layout(colors, background colors) of redux option panel in wp-admin using redux options, then how can i ...
0
votes
1answer
34 views

How can I pass a variable to wp_ajax action?

I'm writing a plugin that pulls data from an external API and inserts it into a bbPress topic. Here's some sample code: function bbp_ajax() { $topic_id = bbp_get_topic_id(); $the_issue_key = ...
0
votes
1answer
20 views

Are widget arguments always set inside My_Widget::widget()?

Specifically, are the before_widget, after_widget, before_title and before_title array keys always set inside My_Widget::widget()? I'm wondering if statements such as the following are necessary ...
0
votes
0answers
19 views

Passing string from a form to another page [migrated]

I have tried several plugins to try and pass a text field to another page via PHP and a HTML form. The form works and displays what was entered if there are no text input boxes in the form. The end ...
0
votes
1answer
31 views

List users by meta_key and meta_value

The following function will display a list of users based on their meta data: <?php function get_users_by_meta_data( $meta_key, $meta_value ) { $user_query = new WP_User_Query( array( ...
0
votes
0answers
25 views

Headers Already Sent

I know this is a favorite error! I understand the principles but I can't see why this code would create this error. page.php includes a get_template_part. I have a test page that renders and does a ...
0
votes
0answers
21 views

Getting most popular posts based on Facebook comments count

I have modified a widget to display the total number of Facebook comments on a post rather than the total wordpress comments. I can get that part to show correctly, but I would like to get the most ...
-1
votes
0answers
26 views

How to debug PHP in WordPress Themes?

PHP Code Sniffers and Debuggers such as phpdbg and xdebug are widely used in web app development. What kind of software/workflow do you use for theme development? How you inspect the value of ...
0
votes
1answer
48 views

Query Post from field with multiple values ACF (Advanced custom fields) [on hold]

I'm basically fascinated in using Advanced Custom Fields http://www.advancedcustomfields.com/ I have a problem,. I created a sample fields inside the Single Post Editing like this Lets name the ...
0
votes
1answer
32 views

Wordpress get_post_meta issue

I'm new to php and was assigned some code to fix within a Wordpress theme, but I cannot figure it out for anything. The code is for the home page of a custom theme and it is supposed to pull the most ...
0
votes
0answers
25 views

Gravity Forms and Custom Post Type Pandamonium [on hold]

Here's the deal: please don't delete this post for anything until I get an answer because I have been everywhere online, and I mean everywhere, with no luck in attaining an answer to this seemingly ...
0
votes
0answers
18 views

Make custom login page in Wordpress [closed]

I have a wordpress based website. Right now, i'm trying to create a custom login system. This login system is a simple system that only prevent user that hasn't log in to access some pages from my ...
0
votes
1answer
35 views

Woocommerce Price Text

I'm trying to show after the price of my product, whether the price is 'per person' or 'per group'. I've created a custom field for both, so for example, if custom field 'price_per_person' is ticked, ...
0
votes
2answers
47 views

Wordpress SQL injection

How to make below code safe from sql injection ... I am working in wordpress. global $wpdb; if($wpdb->insert( 'votes', array( 'votes' => ...
0
votes
1answer
48 views

Web scraping using transients

I'm using xPath to scrape tour dates from another website (with permission of course). Since it updates on every page load, I thought about using transients to store the data. Unfortunately I have no ...
0
votes
1answer
24 views

How to fix blank pagination links?

I am working on a Wordpress blog that has what appears to be custom pagination for the posts. As you can see here the correct amount of links are being rendered at the bottom of the page, however ...
0
votes
1answer
22 views

Woocommerce sending copy of user invoice to admin [closed]

Im wooCommerce it's possible to send an invoice of the order to the customer. I created a custom mail template in my theme which works all great! For my administration it will be much more easily if ...
0
votes
1answer
22 views

How to organize content for tutorials website? [closed]

First of all forgive for my poor english and i am a beginner in the field of wordpress. . I am planning to upload free tutorial website whose layout is as shown below: My requirement is: 1. The name ...
0
votes
1answer
14 views

PHP Parse error on WP-CLI, not on web server

I have a network of over a hundred sites and I try to use wp-cli to make bulk changes to many of these. Particularly to their wp_x_options table via wp --url=site.url option update However, wp ...
0
votes
0answers
12 views

Using a variable inside document.getElementById [closed]

I'd like to use a php variable instead of #particles in the below given code. I tried using: $(" . json_encode($paramnameid) . ").particleground({ but that didn't work. $script = "<script ...
0
votes
0answers
22 views

Woocommerce - Dynamic Price of a product, based on user upload - is it possible? [closed]

I'm using woocommerce, i'm new to it and to php in general so please bear with me. I have to calculate prices based on the volume of a 3d file that a user uploads (it's a small foundry business, so ...
0
votes
0answers
9 views

Notice: Trying to get property of non-object in WordPress if Debug is TRUE

I am writing a plugin for WordPress. I have created a Class as singleton pattern Class code /* * This I have refered from BuddyPress and trying to learn from it :) */ class AssessmentTest { ...
0
votes
0answers
20 views

Define category ID using get_post_meta

I need to define the Category ID in my singles page through custom fields so that i can load a different category depending on the page. This is what i have so far and its not working. Any help would ...
0
votes
0answers
33 views

Single sign-on: wp_authenticate_user vs wp_authenticate

I have a wordpress site (lets call it site1) and another site with oauth2 (site2). When a new user is created, a record is created in both site1 and site2 databases with the same email as username, ...
0
votes
1answer
7 views

Get updated query results on page after insert in database

I am working in wordpress. You will see two queries one is select and the other is insert query. I want that after my insert query is run i get updated results on my page. The select query has a form ...
0
votes
0answers
6 views

MySQL database insert no more works

I am working in wordpress and below is my code which has a form tag in a for loop and the submit button. When submit button is clicked an insert operation needs to be performed but the insert function ...
0
votes
1answer
17 views

Sum of Custom Meta written by Authour

I have a custom meta call post_views_count that collects the views of all posts... I want to create a query that pulls in all posts by a certain author, gathers the custom meta for post views and ...
0
votes
1answer
19 views

Get the id of the row from database on click of a button [closed]

I am using wordpress and I am fetching images from the mysql database with below code. And I display the image and there is a button just with every image and what I want is that when that button is ...
0
votes
0answers
21 views

get post content of particular post by url

I want to get the post content of particular post using Curl or any other methods from third party website is it possible? As the structure remains the same <entry-content> i guess there ...
0
votes
0answers
21 views

Create csv file in plugin

I have written a function to create csv file usin the below code.I am getting Headers already sent warning and I can't able to create the csv file too.How can I fix this problem.I have attached the ...
0
votes
0answers
19 views

How to display user_meta from form?

I have a form on my website where a user can choose their location from a dropdown list (eg, France, Italy, Germany, etc) when they are writing a post. This is the code used for the LOCATION field: ...
1
vote
1answer
27 views

Please help me with <!--next page--> tag and php code [closed]

I'm writing a php code because I want to get a list of items from sql database and insert it in a post of my wordpress website. Since the items could be too many for a single post, I would like to ...
0
votes
0answers
12 views

How to filter displayed posts like what we can see on products page

I wanna know if there is a way to filter displaying post on clicking on menu or a link. I know that there is some ways for admin post list, but i want it for front pages. I think we can do that by ...