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

learn more… | top users | synonyms (1)

0
votes
2answers
15 views

Stumped on migration

I'm migrating a site from my server to a client's Bluehost (ugh) account. I've tried using All In One WP Migrate BackupBuddy manual migration (copying files & exporting a db using WP Migrate DB) ...
0
votes
0answers
8 views

Second dynamic menu which changes on every page

Need to create second dynamic menu (first is static), which would be changed on every page. Anybody have ideas how to make it?
1
vote
1answer
21 views

Returning a value from a PHP page

I have created a WordPress page that has this simple PHP code: <?php $result = array( 'State' => 'Done', 'ID' => 1 ); wp_send_json( $result ); ?> When ...
0
votes
0answers
15 views

Is it possible to have a form submit to a two dimensional array multiple times and display the results on the same page?

I'm looking to have a form accept a name and a description and have it submitted, and on the same page have all the submitted forms shown with the information. I am able to get it to submit, but I'm ...
-1
votes
0answers
16 views

How to place order automatically Woocommerce [on hold]

Is it possible to automate the place holder when user register? Here's the scenario: 1)I have this specific page i send to all the chosen customer 2) When customer register to that specific page it ...
0
votes
2answers
26 views

Add key and value to an array in another file

In my site I'm using the Product Archive Customizer plugin for WooCommerce. Great plugin. However, there is an option to set the qty of products shown per page. The next piece of code is responsible ...
2
votes
2answers
945 views

How to check if a plugin (WooCommerce) is active?

I am trying to modify the head and foot of my WooCommerce pages. I have an if statement that is supposed to target the shop and cart of WooCommerce, but it isn't. If I modify the PHP after the if ...
-3
votes
0answers
20 views

Splitting PHP Loops [on hold]

I have a requirement to split a loop on every 1st then 3rd instance, so the layout would look something like this; <div class="wrap"> <div>content #1</div> </div> <...
0
votes
0answers
23 views

Install and activate WordPress plugins from different web app

Is there a PHP API or endpoint that will allow me to install and/or activate plugins of other WordPress sites, using their URL and authentication info. I wish to build a PHP web app that will have ...
0
votes
1answer
631 views

How to avoid timeout waiting for output from CGI script?

I have Apache Error coming from /wp-cron.php. I didn't modify that file. How can I avoid the timeout?
0
votes
1answer
10 views

multidimensional array within options table contains same information- for custom plug in

I've created a multidimensional array for some settings within my custom plug in, and when I print_r the original and the inner array I receive exactly the same output. $options = get_option ('...
3
votes
0answers
26 views

How to find objects by terms

I am struggling with a search filtering. Firstly, my script is searching for users using natural search SQL. The query returns ids of users. Now I would like to filter them by terms which are assigned ...
3
votes
1answer
157 views

Should the value of core functions be escaped before outputting?

Should the value of functions such as the_permalink() be escaped before outputting to the browser? For example, do I need to escape the following? <a href="<?php the_permalink(); ?>">Link ...
1
vote
1answer
1k 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 ...
0
votes
0answers
32 views

Advanced Custom Fields Show PHP in Text Areas

I recently installed and configured my ACF fields. However, I found out that when I include PHP (ex. <?php the_field('field_name');?>) in a custom field on the admin panel, the PHP only shows up ...
0
votes
1answer
422 views

How to iterate within Magic Fields Group foreach loop?

Okay so I'm using Magic Fields 2 on an old WordPress project (rather than ACF unfortunately) and I've got some confusion happening while I'm writing PHP. Basically I'm on a page template that calls ...
0
votes
1answer
36 views

Where to find the html for Wordpress site?

Where can I find the HTML for a Wordpress site? I'm using the "X" child theme. I found a tutorial explaining how to achieve an effect that I want and it says that "All I need is an HTML markup and to ...
0
votes
2answers
31 views

What is the difference in the WP memory limits?

I have seen this question PHP Memory Limit vs. WP Memory Limit and it has a really poor answer and the question isn't that good either. I am on a dedicated server and can do whatever I want. I want ...
0
votes
2answers
963 views

Including all post id's of a custom post type into an array

For my single.php (products.php), I try to build a navigation via which the user can switch between products based on the meta key "price". I want to put all id's of the products post type into an ...
0
votes
1answer
3k views

Use an anchor link to open an iframe inside a Wordpress page

My Question: How do you make an anchor link to an offsite webpage that when clicked opens up the offsite webpage as an iframe that is inside a new Wordpress page where the Wordpress header and footer ...
0
votes
1answer
25 views

How can I Use 2 databases with one WordPress install

What I'd like to do is have the regular WordPress application run from its regular database, and then have a separate database for a game server which will hold all game data. What I need is to make ...
-1
votes
1answer
30 views

How to string lines from the_content() hook in WordPress?

Inside my content-video.php template, I have the following codes: <iframe src="<?php echo get_the_content(); ?>" width="960" height="540" frameborder="0" allowfullscreen="allowfullscreen">...
2
votes
1answer
2k views

How to get Poster (thumbnail) Image of Video

I'm getting all videos using the function below and it's working fine. Now I want to get the videos Poster Image (Thumbnail Image) from that video. How can I get the video Image as thumbnail? I've ...
3
votes
1answer
54 views

How to preserve PHP modifications while upgrading WordPress?

I made a lot of custom modifications in the PHP code of my WordPress blog. Namely in: archive.php, blog.php, footer.php, functions.php, header.php, search.php To provide customized search results, ...
-3
votes
1answer
29 views

How to execute the “Visual Composer” code on a custom html page?

Visual Composer is an essential plugin for creating a website with Wordpress. I created an html page with Sublime Text without using the tools offered in Wordpress and without using Visual Composer. ...
0
votes
1answer
559 views

wordpress admin part is not accesbile after server shifting

one of my site's wp-admin is not accesible but the site front part is loading. This happens after i accessed the site from my new server second time. at first nothing happens and i can logg into ...
-1
votes
0answers
19 views

Plugin “Remove Slug From Custom Post Type” gives 404 Errors

This plugin did all I wanted, but it started giving me 404 errors, which go away after a while but I'm worried they'll come back. I do get this error while posting a new listing (real estate theme) ...
0
votes
0answers
34 views

Unable to view data in Options table for plugin

I've created a plugin which contains a form and I am trying to get the data from the form to post to options, but the data is not. I've checked in wp-admin/options.php and the plugin does not contain ...
0
votes
1answer
32 views

After upgrade to php 7 plugin/them updates broke

I upgraded my Ubuntu server to php 7 and setup ssh2. Afterwards, my WordPress plugins/themes will not update. I am receiving the Unable to locate WordPress Content directory (wp-content). This ...
1
vote
1answer
54 views

Upgraded to php7.0, now ssh updates don't work

I updated my server from Ubuntu 15.10 to Ubuntu 16.04, and one of the things that updated was PHP. After the upgrade, doing plugin updates over ssh don't work any more. At first it was prompting for ...
0
votes
0answers
11 views

Ajax interfering with widget back end Javascript

I have a plugin that creates a widget that allows users to click a button and select an image. I have noticed that immediately after the widget is dragged and placed into a widget area, two Ajax ...
0
votes
0answers
20 views

Pass the data from Custom Form in wordpress

How can I get the value from custom form in WordPress and stored into teh database? Here is my form. I used the bootstrap validator for this form. Now, what do I have to do to get data from this form? ...
7
votes
5answers
5k views

the_date() not working

I am using wordpress 3.2 and I did a query post like this: <?php query_posts("posts_per_page=1post=type&page=post_parent=10");?> Then I try to echo out the date of this post I queried ...
0
votes
1answer
874 views

save_post action inside a custom metabox class not working

I am writing a class to create metaboxes and save the form data. The problem is, I keep getting a warning when I click "publish": Warning: call_user_func_array() expects parameter 1 to be a valid ...
0
votes
1answer
22 views

Combine CSS and JS files from plugins

I want to combine all my CSS and JS files. Given the fact that I use different plugins I don't see a way to do this manually because after an update of the plugin I have to start all over. So I did ...
0
votes
1answer
2k views

Add a wp editor to custom plugin and save data

I'm creating a custom plugin. One of the fields in the plugin let's the user add data. If I add a textarea the user has no control over the text. So I would like to add a editor. I know WordPress ...
-3
votes
0answers
27 views

error in a php snippet: is_checkout() [on hold]

I am seeing a new error in a snippet I've been using successfully (until recently). Something in this line is off... if ( ! is_checkout() || ( is_checkout() && WC()->cart->...
0
votes
1answer
25 views

Child theme functions.php file change database entries

I'm sure my title is not the correct terminology. I will do my best to explain what I'm trying to accomplish. Years ago I spent countless hours customizing a theme. I was finally forced to update ...
-1
votes
0answers
26 views

How to make random order ACF gallery?

My code is: <?php $images = get_field('gallery','option'); if( $images ): ?> <div id="slideshow"> <?php foreach( $images as $image ): ?> <img src="<...
0
votes
0answers
18 views

AJAX call to Vimeo API from WP admin

What I am trying to do is query the Vimeo API to populate some ACF fields in a custom post type. I'm loading this in the admin head for WP Editor, which grabs the Vimeo URL from the ACF field, and ...
-3
votes
0answers
32 views

Extend Wordpress plugin “The events calendar” [on hold]

I'm a newb in wordpress plugins, and I need to extend popular plugin "The events calendar" by using hooks in functions.php or creating new plugin. First question, at the moment its twentysixteen ...
45
votes
5answers
31k views

What are PHP extensions and libraries WP needs and/or uses?

Codex loosely only mentions PHP version in server requirements, however PHP can be configured in pretty wide range of excluding/including different parts. What are extensions/libraries that: are ...
0
votes
1answer
494 views

WordPress get pagination on wpdb get_results

How do I gee the numbered pagination of custom wpdb result? below code will show one latest post from each authors in the site. I want to show 20 posts per page with a numbered pagination. $postids ...
0
votes
0answers
10 views

Woocommerce how to make the sub-category sorting to be seen on sub-categories also?

i found a code that adds this sorting to Woocommerce Category pages. the problem is that i only see it on the Parent category and not the sub-categories pages. can some one tell me what should i add ...
5
votes
1answer
41 views

When to use Exceptions vs Error Objects vs just plain false/null

I'm in the process of writing a plugin and I'm trying to gauge when to use different approaches of handling errors. There are three methods I'm considering: Throwing an Exception (custom class) ...
0
votes
1answer
2k 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
582 views

Multiple options not staying selected after saving

Problems: The save works, but is only storing one of the options in the database after save. Options not showing as selected after save. The select fields: <select id="...
0
votes
1answer
39 views

Basic PHP question (displaying post title over thumbnail)

I'm new to PHP so excuse the vagueness of this question. I am using a plugin called WP-Tiles that takes a group of posts and displays them in a grid. I'm calling this grid with the following function: ...
0
votes
1answer
23 views

WP_Query Custom Post Type if Category ID Equals

I've setup a custom post type "slides" and I've created two categories for the slides custom post type: "slides-testimonial" (id = 7) and "slides-regular" (id=8). I would like to run a single loop, ...
0
votes
1answer
25 views

Only Get A Certain Number of Posts From WP_Query

I'm not sure what I'm doing wrong. None of my WP_Queries are returning the given number of posts. From what I can tell, it's returning all of them. How do I fix this? Here is the code I'm currently ...