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

learn more… | top users | synonyms (1)

0
votes
0answers
24 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? ...
0
votes
1answer
51 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
68 views

After upgrade to php 7 plugin/them updates broke [closed]

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 ...
0
votes
1answer
26 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 ...
0
votes
0answers
24 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 ...
0
votes
1answer
44 views

Basic PHP question (displaying post title over thumbnail) [closed]

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
30 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
31 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 ...
0
votes
0answers
36 views

Custom Meta Box Image Gallery Not Saving

I'm having an issue of a custom meta box I'm building based off of WooCommerce's Product Gallery meta box. The meta box is not saving for some reason. I've tried some options from many different ...
0
votes
1answer
28 views

customizer live preview layout picker

I'm trying to create a layout picker option using the wordpress customizer. What i've done so far works except for the live preview. when i change an option in the customizer for example left sidebar ...
0
votes
1answer
23 views

Custom Post-Type not in admin menu

As I'm working on a private and custom theme for my website, I created custom post-types for different kinds of data i want to display (and adding extra data with custom fields). Anyways, as I ...
0
votes
0answers
24 views

Wordpress Pings Backs From My Own Application

I'm building my own forum software and I would like it when a user creates a post with a link to a Wordpress site it will notify the site that I have linked to it. I've searched around Google and I ...
0
votes
1answer
24 views

Issues separating my Plugin pages into different files

As my last (first) plugin got a bit hard to manage with 6 admin pages in 1 file, I decided to split them up for this one, but I am getting nothing but issues doing so. In my plugins functions file (...
0
votes
0answers
32 views

Wordpress theme not show php correctly

On my server i got an updated version of WP, with a working theme. I just made a new one. The problem is that when i activate it, (or just preview it, via customize) it doesen't render php script. ...
-1
votes
1answer
34 views

How to insert current “login” page to certain page?

How can I insert the current "login" page to another page for visitors? Basically, means that if a visitor wants to view some pages, once they click to view pages and where it should display "login" ...
0
votes
0answers
19 views

Override $table_prefix only for the options table

The only documentation i found was too obsolete. (https://wordpress.org/support/topic/two-sites-two-themes-one-database-same-content) and this one (Change options table prefix only) doesn't help me. ...
5
votes
4answers
229 views

Does My Child-Theme Functions.php Need if{die} Security In It? [duplicate]

I'm new to PHP, but I've noticed just about every PHP file has a security snippet, "Die if not accessed in the correct manner" script at the beginning; my question, does a child-theme functions.php ...
0
votes
1answer
26 views

How to display all custom fields associated with a post type - IN THE ADMIN AREA?

I know know how to get all the custom fields from a custom post type, that's easy. However, when I create a custom post type, it displays a beautiful page automatically in the administration part of ...
0
votes
1answer
51 views

How to create a thumbnail with php?

I am creating posts using wp_insert_post(), but these posts do not have featured images. I have a post ID, and a path to the image on my server, how do I set them as the featured image? EDIT : I ...
1
vote
1answer
78 views

Wordpress admin is incredibly slow [closed]

I built a WordPress site for a client a couple of years ago and over the course of those years, they've accumulated 21,000+ articles, have 30,000-50,000 views per day, and have 300+ active writers, ...
1
vote
1answer
26 views

From where the header-text can be changed in WordPress custom header?

I am developing a small theme as I am beginner. I am setting up custom-header using add_theme_support() function. From there I can change the header image in the front end. Ok, so far is good. Now In ...
0
votes
0answers
14 views

Retrieving cell values from options table on specific page template

I outsourced this task to a contractor over the past week as i'm up against it timewise. The contractor has been unable to deliver it, so i'm looking to try and get this solved myself asap with a ...
0
votes
0answers
14 views

Pass JS VAR back Through AJAX

I have a PHP array that contains the post IDs of categories collected using AJAX that I need to pass back to be used in jQuery; Array ( [0] => Array ( [id] => 15 ) [1] => Array ( [id] => ...
1
vote
1answer
55 views

Why not yield/iterable in posts interface?

I was reading an article on the advantage of yield statements and iterables - a handy and useful thing where "the list is so large that merely creating it would consume all of the system's memory" ...
0
votes
0answers
14 views

Using the function of wordpress in the director on another folder

In the public_html I have installed my wordpress there, the folder wp-content wp-admin were there I'm thinking if I have another folder called 'test-folder' and I have a file there which is test.php ...
0
votes
0answers
20 views

how do i add an array of objects or an extra field to a wordpress json api core controller?

Is there a way to add an array of objects to a core controller of the json api plugin the core controller i want to modify is 'get_category_index' and it returns these objects id post_count name ...
0
votes
0answers
12 views

What is the best option to change menus automatically using cookies in a Multisite installation?

I am developing a Portal using the Wordpress Multisite option. I would like to create a portal's homepage with options that direct the user to his country's website (Subdirectory). And i would like ...
0
votes
1answer
30 views

child parent styles enqueue order

I have a wordpress theme which I hacked to my specifications. I know I'm not supposed to do that but it was long ago so now I'm trying to implement a child theme and I've put those revisions into the ...
0
votes
1answer
47 views

Need help removing […] after excerpt

My website is watersedgeofshelton.com and i need help removing the [...] after the excerpts on the blog posts (under activities, marinas and restaurants" I read that I had to add this code to my ...
0
votes
1answer
18 views

Conditional string comparison failing for basename/slug

I am trying to display a particular block of html for one page in particular. I have created a conditional statement that compares the basename of the page to my string. <?php if ( has_tag( '...
0
votes
1answer
19 views

Getting the date_diff function return the difference in days

I've been trying to build a feature to count the days it takes for products to be sold. We are selling unique items on behalf of our customers so it's good to know for reporting and product management ...
0
votes
1answer
24 views

Limit Taxonomy Output in Conditional Statement

I am trying to limit the amount of category tags I output to 5 as well as append a "..." to the end of any items where the output was limited. I've got it mostly working except I can't figure out how ...
0
votes
0answers
21 views

wpdb->prepare clarification

Is there anything wrong with using wpdb->prepare() to retrieve items from a custom database table? Note how I've used prepare() below, without passing the $type variable through prepare(). I just ...
2
votes
2answers
52 views

Page Reloads Before AJAX Request Finishes

I am working on a WP plugin, and I need to be able to call a URL (specifically an AJAX function) using a button click, but the page refreshes after clicking it, which I think is preventing the AJAX ...
-1
votes
2answers
71 views

How to wrap every 3 posts in a div (and close the last div too) [closed]

I have code that wraps every 3 posts in a div (so that the posts will line up horizontally even if different heights). It closes the div after 3 posts, but the problem is the div is left open if there ...
0
votes
1answer
73 views

Convert canvas to image and upload image to server

I'm working on a wordpress site about blackout poetry for a university project, where the user can blacken parts of a text to create a poem. After the user has created his poem, we need to give him ...
0
votes
0answers
24 views

Issue with search form admin panel after PHP migration

I have website hosted on OVH, and currently I am using PHP v. 5.3. Since OVH will stop supporting it soon I have to migrate to 5.4, 5.5, 5.6 or 7. I've tried 5.6 and 7 but what happens is that ...
0
votes
1answer
80 views

Remove &nbsp; at the beginning of the_excerpt() with str_replace

I am trying to remove blank spaces at the beginning of the_excerpt();. They are cuased by blanc spaces between two images in the content. I have unsuccessfully tried to get rid of them by using ...
0
votes
1answer
30 views

get_users meta_query: REGEXP not working for matching new lines

I have a meta field "my_meta_field" which may contain the following for these sample users: User A 99999 559225 12519 User B 5020492 99999 125191 User C 194295 1199999 Newlines are \r\n or \...
1
vote
1answer
95 views

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

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 ...
-2
votes
1answer
40 views

how to use header function in wp-load.php file [closed]

I am making a file that is used for downloading files that are stored in my website. But when I try to download the file on clicking a button, it does not load the file. I am using header function to ...
0
votes
0answers
32 views

How to change the capabilities from upper case to lower case, while inserting onto database?

I am trying to insert custom user roles like Student, Teacher and Parent. While inserting the capabilities into the database, it is displaying the role in uppercase. I am not able to fetch the user ...
1
vote
0answers
16 views

save imported posts as drafts

i m trying to import data into as my posts using wp all import and use add_action(save_post,myfunc) to run a function to update some fields all's good so far...but instead of publishing them all at ...
3
votes
1answer
45 views

Creating search filter through plugin

I'm using wordpress for real estate project, for that, I am using a theme together with a plugin (realia real estate) to real estate. So I believe that this not is beside the point ... My question is ...
0
votes
0answers
32 views

Custom Page Load by wp_query

Is there a way I can use wp_query to retrieve custom pages and posts, and display them on the front page of my WordPress site? I'd like to do that for every custom page I have, to end up with a one-...
0
votes
1answer
24 views

Output custom text field as unordered list

I am quite new to php. I am using advanced custom fields and have a custom field with the name tags. Users are inputting content such as: Tag 1, Tag 2, Tag 3 I would like parse this output and ...
1
vote
1answer
76 views

How to implement WP_List_Table? WP_List_Table giving array instead of a value in listing table

I am trying to implement WP_List_Table for my plugin. I have gone through this tutorial and using its sample plugin. I have installed this plugin and just changed table name and done slightly ...
0
votes
1answer
29 views

How can I properly control the numbers and dots that appear in pagination?

I have custom pagination that allows me to modify the mark-up for the code WP outputs: in functions.php function wp_custom_pagination($args = [], $class = 'pagination') { if ($GLOBALS['...
1
vote
1answer
39 views

How to output widget

I have the following code to display widgets in the customizer. function arphabet_widgets_init() { register_sidebar( array( 'name' => 'Social Media button', 'id' => ...
6
votes
1answer
120 views

Uploading media with the REST API

I am having trouble when uploading media to a WordPress site with the JSON REST API. With the following code I can upload the photos, but no info is assigned to them, not even the name - in fact the ...