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

learn more… | top users | synonyms (1)

0
votes
0answers
3 views

Get Current user email as a return string value

if(strpos($query, '%get_email%') !== false){ $query = str_replace('%get_email%', get_the_author_meta( 'user_email' ), $query); } Okay so am trying to make a MySQL query and in the ...
0
votes
0answers
4 views

How to Update GravityForms User Registration / User Meta in Edit Profile?

I am using the GravityForms User Registration, with a custom User Meta, umnum = mobile number. The theme I'm using has an edit-profile.php page. I placed the following HTML code into the file and ...
0
votes
1answer
10 views

Wordpress 4 invalid username special charachters issue

I have some danish users that uses special chars like æøå and they can't log in to my wordpress blog. I tried on a fresh install on 4.2.2 and on 4.1.5 and it did not work, for example Andrew ...
0
votes
0answers
9 views

probleme adding Txt and Links in preg_match()

I'm newbie in PHP, i use this PHP code who work as a charm (@Brian Fegter) : add_action('template_redirect', 'foobar_explode_if_no_citation'); function foobar_explode_if_no_citation(){ #Get the ...
0
votes
0answers
5 views

Woocommerce Refunds Functions?

I created a separate orderslist page for our employees so that they dont have to use the Orders tab in wp-admin as we have a lot of custom functionality. I am now trying to allow my employees to ...
0
votes
0answers
13 views

Whats your oponion? Laravel's new “Lumen” for WordPress plugin development?

Would it make any sense to use Lumen for WordPress plugin development? I'm curious. The new lightweight "Lumen" framework, made by Laravel creator Taylor Otwell.
0
votes
0answers
22 views

Loop only displaying one post

After a WordPress update the following code started only displaying one post on the page. I thought something was deprecated so I updated the parts I was sure about. But I'm still getting pretty much ...
1
vote
0answers
9 views

How to Internationalize Wordpress - Extract strings with textdomains, per textdomain individually

I spent several hours searching, and have not found a solution, how to extract Strings dedicated by Textdomain from a PHP File (in a wordpress plugin): In my plugin and theme I use for example ...
0
votes
0answers
5 views

how to clear cache of checkout details for guest in woocommerce after certain time of inactiveness

In wooocommerce a guest shopping items (before loggin) and after that that person goes to checkout page. Now I've create checkout form in such a way that after selecting country from the dropdown it ...
0
votes
0answers
5 views

how to change shipping cost after changing the currency from “WooCommerce Currency Switcher” plugin

I'm developing a woocommerce wordpress shopping cart website, where I use "WooCommerce Currency Switcher" plugin for currency conversion. There are three currencies.. pound, dollar and euro in the ...
0
votes
0answers
8 views

validate phone on wordpress (woocommerce)

I'm trying to validate the next code of woocommerce to only accept 10 digits not more and not less. I already found a regex but not sure why I still can put more than 10 digits yet ...
0
votes
0answers
5 views

My customizer's setting doesn't set to the default and needed to click the control's “Default” button before it'll be set

Here's my sample customizer's setting and control: $wp_customize->add_setting( 'themename_img', array( 'type' => 'theme_mod', 'default' => ...
0
votes
0answers
5 views

Using Isotope in WordPress portfolio

I'm trying to create a custom post type portfolio and use Isotope for filtering according to categories but I'm not doing something right. I've loaded scripts in my header.php, created a custom post ...
0
votes
1answer
13 views

How to use TCPDF library in wordpress

I would like to use the library TCPDF to create pdf. Specifically, I want to create a pdf after clicking a button available in every custom post type called Property. This PDF has to have Property ...
0
votes
4answers
41 views

how to hide or disable some part in specify page

i want from my footer.php file some part like <div class="form">----------</div> this part will be visible all page but not show in home page and few other other. i think it is possible ...
0
votes
1answer
20 views

how could I load a different template part by page

I would like to use get_template_part(); to load a different template parts on different pages. so on the home page it loads get_template_part( 'content', 'home' ); and on the blog page it would load ...
0
votes
0answers
8 views

Auto Add Category to RSS Feed Posts

I pull in a RSS feed that creates posts using the Push Syndication plugin. Those posts come in without a category. I need them to come in with a category automatically. Is this possible using some ...
1
vote
0answers
21 views

How to Create a Subscribeable News Feed?

I am working on a subscribeable feed for my WP site, but I have little knowledge in PHP/storing items in a database. Here is what I need it to do: -You register for an account and you are taken to ...
0
votes
0answers
28 views

Add options to Wordpress backend

I hardcoded a page to use for a Wordpress-Site I'm managing but then my boss decided that said page needs to be editable from the backend for our customers. Long story short: How do I add editablity ...
2
votes
2answers
40 views

What is the most efficient way to search users by their display name?

Initially I thought I'd use get_users() but it turned out it doesn't support the display_name field. Then I've read about using WP_User_Query, but when I do it always exhausts the allowed memory size ...
0
votes
0answers
13 views

Filtering with woocommerce data attributes

I'm working on woocommerce based booking system. I want to filter product by availability. Now I have custom data attributes for dates. It's submitting in wp_postmeta table. My date returning array ...
0
votes
2answers
29 views

If else statement based on referral URL

I am trying to display content in a custom template based on referral URL. I put a link in my footer called http://domain.com/?ref=special and image2.gif shows still when I click it and go to the ...
-1
votes
0answers
22 views

PHP Warning: Invalid argument supplied for foreach() [on hold]

I am trying to set up a theme locally but am getting the error "Warning: Invalid argument supplied for foreach()..". The custom field images/data that are supposed to be showing up are not & it's ...
0
votes
0answers
4 views

Save the outputted image into the Media Library, with a different filename and extension

For example, I have this "/image.php" file in my "/theme-directory": header ('Content-Type: image/png'); $im = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); ...
0
votes
0answers
16 views

How to get values from Gravity Forms fields? [on hold]

I'm using gravity forms to allow users of my site to submit posts from the front-end. I have a URL field, where they enter a URL to an external webpage into the form along with a title field. In my ...
1
vote
1answer
52 views

How to store the_title() into a variable to reutrn the value, not just echo it

I have a loop, and need to pass one more argument through it. I need to get the current page's single post title, and then use that as the value. I tried going about it like this: $tagz = ...
0
votes
0answers
20 views

Create a simple mu-plugin that appends “?mobile” to all links

I have a wordpress website that is set to switch themes when "?mobile" is present in the url. I'm using it for a specific mobile design that will launch from a particular link. So, instead of ...
0
votes
1answer
10 views

Changing layout with wp_customise

So I'm trying to build a conditional statement to display different layouts depending on the option selected. Having a bit of trouble. $wp_customize->add_setting('layout', array( 'default' ...
0
votes
0answers
27 views

Querying latitude and longitude into google maps correctly

Im have custom fields for lat/lon and querying them into google maps. The query im using works if I know the exact number of lat/lon. $args = array( 'post_type' => 'events', ...
1
vote
0answers
15 views

How to update post meta on uploaded image from a custom form?

I have a custom PHP submission form wherein if I submit the form the entry will be created as a custom post. I am able to update post meta boxes for textareas and input fields but can't get uploaded ...
1
vote
1answer
16 views

do_shortcode with custom field

Ok I suck at PHP, so I'll explain this in "English" first then proceed to code. I've got a custom field in my WP DB called ecpt_imdb - this is the numeric value of a movie from the imdB. For example: ...
0
votes
0answers
12 views

Run insert if no entry otherwise run update with ajax

Below function works with ajax ... but I am getting a null result ... I want that if there is no data in the database then insert operation is performed and when there is data the update should work. ...
0
votes
1answer
12 views

Wordpress installed using WAMP.The requested URL /project/wp-admin/wp-login.php was not found on this server [on hold]

I did a mistake handling config file in php now when I corrected I was able to install wordpress. Now login page is not opening. Please help me. I am new at Web Development and getting error. The ...
0
votes
1answer
36 views

Scrape external webpage for first image and add it to new post

I'm looking for a way to scrape an external page for its first/best/largest image and insert a copy of that image as the featured image of a new post on my Wordpress site. The way that I was hoping ...
0
votes
0answers
19 views

Serializing URL via wp add_shortcode to auto select from option list onload

first time in the wordpress stackexchange community! Great that there is such a thing... Scope: Use of the add_shortcode method to use url string to automatically select options in a scraped table on ...
-1
votes
0answers
19 views

Running some php function from admin bar [closed]

I want to use my admin bar to run some functions from a plugin I developing. So far I managed creating top level menu item and submenu item in the admin bar. The submenu item should be usually linked ...
0
votes
1answer
17 views

Why my query does not run with prepare

Hi Below is my query and it works with prepare keyword on the localhost but whenever I use prepare keyword with my queries on live server the data does not show up and as soon I remove prepare from ...
0
votes
1answer
30 views

blank page when trying to change upload directory

Working with wordpress 4.2.2, when I use this code in child theme function.php to change the attachments upload directory according to each post type : function wpse_16722_type_upload_dir( $args ) { ...
0
votes
1answer
39 views

Callback URL in WordPress

I want to use this service OnWebChange to monitor when a website changes and change mine accordingly. It would notify me via a URL callback to my website URL with a HTTP POST method. What ...
0
votes
0answers
13 views

Wordpress Formidable Pro frm_after_create_entry [closed]

I am working on code that copies entries from one Formidable Pro from to another. I know basically nothing about code so I am asking for someone to help me with fixing this below code. ...
-1
votes
0answers
16 views

Make a post appear on the page [closed]

I have a group of posts titles appearing in an array called $bigPostsTitleArray. I am trying to get everything inside the wysiwyg editor for the first post in $bigPostsTitleArray to appear on the ...
0
votes
1answer
38 views

How to organize functions.php content

When building custom themes, I often add my own functions inside functions.php: <?php function my_function() { // Do something... } Should I organize all my custom functions ...
-3
votes
0answers
15 views

Plug in to enable registered users to access non-wp database [closed]

Are there plugins to enable me to set up a registration process for front-end users in order for them to access a private part of my website so that users can complete forms that update their details ...
1
vote
0answers
13 views

how to drop variables on successful submit [on hold]

Hello i've made a submit form on my wordpress form which sends some data to a table in my database... well surprise ;) <input class="inputtable_start" type="text" id="startA" name="startA" ...
0
votes
1answer
16 views

How to enqueue assets only on queried pages, excluding the page being queried?

How can I enqueue scripts and styles ONLY on admin pages that have a query attached to them? I have the code below which works, but it also enqueues on the native page of the query. I want to ...
0
votes
1answer
20 views

Archive page if else not working for post_excerpt and post_content

I want to show the excerpt from a post only if it exists. If it does not I want to show an excerpt of the content text of the post. Here is what I came up with: <?php $my_excerpt = ...
1
vote
0answers
29 views

How to make own crop image function for WordPress plugin

I am working on a plugin, in plugin i create an upload meta fields for images to upload one or more images. Its working perfectly and in plugin settings i gave options to users that they set images ...
0
votes
1answer
27 views

Create Customization Controls from Array

Coming from a Javascript background and humbly jumping into WP dev I'm having some trouble with PHP (especially in a WordPress context). Here's what I'm trying to do: Create controls for the ...
0
votes
0answers
16 views

Loop through multidimensional array for values, then interest into mySQL table

I have a package of JSON that gives me something like this: [{"a":"5", "b":"9", "c":"3"}] I have a table with with three columns: a, b, c. I want to create entries into the table to match 'a', 'b', ...
0
votes
0answers
3 views

Dynamically PHP-generated content and SEO [migrated]

So I'm using a function in my functions.php file to add some text to all my posts. I was wondering if that will be used by Google when they index my website, and how that will affect my SEO ratings. ...