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

learn more… | top users | synonyms (1)

1
vote
1answer
24 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
19 views

Display XML - basics [on hold]

I have the below xml on a secure FTP server (I have a cron job downloading the file from the ftp to my web server at 5 minute intervals). <document version="4.0"> <incidents profile="...
0
votes
0answers
13 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
13 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
51 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
11 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
11 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
21 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
43 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
16 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
15 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
21 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
19 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
41 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
45 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
42 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
20 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
60 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
26 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
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 ...
-2
votes
1answer
38 views

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

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
30 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
15 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
0answers
34 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
29 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
43 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
25 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
32 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
2answers
89 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 ...
0
votes
1answer
26 views

Dividing the loop to style post differently

I'm using a plugin that displays post and shows them in a certain area on my site, such as the sidebar or anywhere i put the <?php;?> code, but only if the author that is writing the post clicks ...
1
vote
1answer
28 views

Custom query, checking values of multiple meta keys

I am using two plugins, and I have some issues combining them. One is an event calendar, which add new meta keys to posts, the other is a show-posts-as-grid plugin, that fetches the event posts from ...
-1
votes
1answer
24 views

Advanced custom fields Repeater conditional statement not working [closed]

Even if no value for a field is entered my elements inside my echo still show inside my conditional statement. Thinking that is just checking if the field exists rather then checking if a value is ...
0
votes
0answers
12 views

add_rewrite_rule to fix fastcgi issue with basic AUTH

The issue is that $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] are not populated if PHP is running CGI/FastCGI as the server API. I've read there is a possible fix with this through htaccess ...
0
votes
0answers
9 views

Pulling in post ID into Live Edit functionality

Pulling in post ID into Live Edit functionality I've got a social media site built off BuddyPress, where we've built custom post functionality off ACF fields, and I need to tie in front-end editing ...
1
vote
1answer
29 views

Archive post by meta value + 24hours

I'm using this code to archive some custom post type : $where .= " AND wp_postmeta.meta_value >= now()"; The metavalue is a date field. On the day of the value of the datefrom has been setup the ...
0
votes
1answer
27 views

Include a php file from another plugin

Inside one of small custom plugins I really need to inlcude a file from another plugin, in order to be able to create and save obhect of a class that is declared there. What I have tried and the ...
2
votes
0answers
33 views

my function doesn't return my post from today

I'm using gravity form to create some custom post type - as events. Everything is working great, There is some date field to setup the event from x to y date. ALl of this working great. However, I ...
0
votes
0answers
28 views

How can I add rewrite rule for custom page?

I'm showing child categories data in custom page using wordpress. Problem is that i'm fetching those child categories from parent category slug. www.example.com/digital-post-page/?cp=category-slug ...
0
votes
1answer
41 views

Advanced Custom Fields Image Field returning ID instead of URL [closed]

I'm using ACF to add custom fields to a User. I'm trying to output these fields to the front-end. I was able to pull all fields, but when I was trying to get the img it wouldn't pull. Here's my code: ...
0
votes
1answer
36 views

Setting up the child theme so as to enable right-to-left WordPress?

I want to make a child theme for twentyfifteen theme in WordPress to show in right-to-left direction. I read the documentation on that in Codex. But to be honest, the documentation was good for a ...
0
votes
0answers
35 views

wp_mail Not Working Correctly

I am trying to use wp_mail to send an email with an attachment, but there are a few issues: 1) The attachment does not appear 2) I have to use the direct URL to send the email (not working on button) ...
2
votes
1answer
64 views

Understanding child theme functions.php

I have successfully created a child theme for the Emmet Lite template, using the information provided on here and here The CSS file of the child theme looks like this: /* Theme name: Emmet Child ...
1
vote
1answer
67 views

Store and Work with huge array in WP [closed]

I need to get all terms that have post with dates in custom field. So I need a list for all dates from the term. I need to know exactly what is tha dates within each term in my site. It's not in term, ...
0
votes
1answer
16 views

Get css class of menu item in custom menu structure

So, I've created custom markup for a menu. The functionality of the menu is built like so... <?php $parent = array(); if (($locations = get_nav_menu_locations()) && isset($locations[...
0
votes
2answers
68 views

Shortcode is not outputting all of the desired markup

I'm having trouble getting my shortcode to output all of the markup - for some reason it's only outputting part of it. I have the following function: function shortcode_container($atts, $content = ...
0
votes
1answer
34 views

Getting a variable inside foreach from PHP to JS after localization

I believe I have properly enqueue'ed and localized my script - I've got $q showing up in the DOM. Now I'm sure I'm missing the simple last step to accessing a variable in the JS function. Here's my ...
0
votes
1answer
32 views

Conditional featured image with youtube thumbnail

Basically what I am trying to do here is: Display the youtube thumbnail. If no youtube thumbnail -> Display the Featured image for the post. If no featured image -> Display the fallback image. ...
0
votes
0answers
6 views

post_row_actions to print pdf

I'm a bit of a newbie wordpress dev so apologies if this seems like a bit of a stupid question to ask. I'm trying to add a plugin which will allow me to print posts as custom styled pdfs. I've added ...