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

learn more… | top users | synonyms (1)

0
votes
0answers
2 views

Display message once per session to users with a specific role

I need to display a message to only users with a specific role. The message should appear either as soon as the user logs in or if they re-open their browser after having closed it when logged in to ...
0
votes
1answer
8 views

Echo a shortcode div after every 3 posts

In my wordpress home.php file, I have placed an increment loop with the help of a few stackexchange threads: <?php if (have_posts()) : ?> <?php $count = 0; ?> <?php while ...
0
votes
0answers
6 views

Php function modifying the page's rendering engine buffer and blocking caching plugin

I tried to create a plugin which creates pages based on a CSV or excel file containing hundreds of city names and postal codes. It creates one page per city, with always the same design but different ...
1
vote
1answer
23 views

Crop thumbnail images - add_image_size - Wordpress [on hold]

Since the question is not being answered on Stackoverflow, I am trying here instead. I am trying to add a thumbnail crop to images, however I can't get it to work correctly. I have faced similar ...
1
vote
2answers
26 views

WP Query. Is there a maximum size?

I develop a plugin that searches for a duplicates of WooCommerce products in a very specific way. It works great in our test environment, but on the client's original setup it does not execute. It ...
1
vote
2answers
28 views

Display latest x posts from all categories in Custom Post Type/Taxonomy

I am attempting to display the latest x posts from all categories using a custom taxonomy called 'case-studies' in WordPress. I have managed to output all the category names as heading links I have ...
0
votes
1answer
6 views

wp_nav_menu prints children with parent name

This code echo wp_nav_menu( array( 'theme_location' => 'primary-menu', 'depth' => '2', 'echo' => false ) ); prints Parent - Parent - Parent - Parent instead of: Parent - Child 1 - ...
0
votes
1answer
10 views

Remove price from Woocommerce variable product dropdown menu

I'm trying to hidden or remove the price on each variable products inside dropdown menu on a single product page. Please see image attached below. I believe here is the codes that needs to be ...
0
votes
0answers
9 views

How Can I use WPUF Pro for storing values in one other plugin

First of all i want to say i am a nob in this field of PHP coding. However, I collected some pieces of code that if some professional make some edits, it will be of great help to me. I have a plugin ...
0
votes
1answer
21 views

WP_Post is not from correct array

A bit of a complicated problem here, but I figured I'd see if I could get any help. My logic is this: WordPress custom post query > for each of the results, factor in distance (calculated ...
0
votes
1answer
25 views

Pagination reset problem

I need a fix for this web page. The page is attached if you wish to review the code. The pagination on each tab does not reset to 1 when the user has made a selection. This needs to reset when they ...
0
votes
1answer
32 views

Use WP_Query Data In Cookie

I've collected an array and set-up a cookie via functions.php, both work fine. However, I really need to post the data to the function and set the cookie as this information will vary per customer. ...
-2
votes
0answers
24 views

Convert My Code's In To Metabox

I have the following PHP: // define variables and set to empty values $gname = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $gname = test_input($_POST["gname"]); } function test_input($data) ...
-4
votes
0answers
20 views

How to add custom fields to a form?

How do you add custom fields to a front end form which is for post submissions.For example if a there's a custom post type named "events" and there are custom fields applied to it.The front end form ...
0
votes
1answer
22 views

Using Cookie Data For WP_Query Loop

I'm trying to retrieve data set in a cookie and use this to run a query. I've set the cookie in functions.php like so; add_action( 'init', 'resultsCookie' ); function resultsCookie() { ...
0
votes
0answers
16 views

Get Wordpress Article Remote as Array [on hold]

I want get a Wordpress Article. The last Single Post. As Example: Wordpress Blog A Last Article would be Show on Page B. I use the PHP XML-RPC Api, what for filter i must use for the last one?
-1
votes
1answer
25 views

How can I insert a record into a custom table from my custom form in my custom admin page?

I'm struggling with this one and all of the relevant links to the codex, articles and forum posts (stack or otherwise) that I've searched haven't helped. I can best describe my problem as attempting ...
0
votes
0answers
16 views

Saving plugin settings - ERROR: options page not found

I've created a form for my plugin settings and set the action attribute of the form to "options.php" but when I submit the form I get "ERROR: options page not found." add_action('admin_menu', ...
0
votes
0answers
12 views

wp-admin folder gets deleted regularly

Recently, I migrated WordPress site to Amazon AWS. I am getting this weird problem where wp-amdin folder gets deleted regularly like in once a week. I recover this folder using my backup and the site ...
0
votes
1answer
11 views

How to dispaly custom fields value in frontend [on hold]

My code $meta = get_post_meta( get_the_ID() ); // Get custom meta value $post_offer = $meta['custom_offer'][0]; echo 'Offer: '.$post_offer;
0
votes
0answers
18 views

Trying to add a list of 4 products below each subcategory title on the Product Category page

I am trying to add 4 products below each of the subcategories for the Product Category page, these should be 4 products from the specific category. Picture below to explain: http://imgur.com/0ziqRGp ...
0
votes
1answer
14 views

Use get_option with $emailTo on contact page

I have created a contact page, and all I want is to make the variable $emailto be dynamique. What i mean is i have an option page on the backend and I want to let administrator change the contact ...
0
votes
0answers
24 views

Reformat data within a nested array

I have the nested array of data below which comes from the Wordpress Formidable Pro plugin form entries database table. I would like to reformat it so I can use it in a Wordpress WP_list_table but I ...
0
votes
0answers
12 views

Client portal/Custom Users

Here is my problem: I have to create a client portal that shows some parts of the website to the logged users, and I prefer to do that without a plugin (like WP-Client). I need to import client data ...
0
votes
1answer
99 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
11 views

directorypress theme error mysql_error() [on hold]

I installed directorypress theme to my wordpress site all works fine except this section " my purchase history" its sql error, but I can't deal with I want to remove this error or hide the link " my ...
0
votes
1answer
18 views

Preg_Match(): compilation failed unknown property name

I'm having a problem with a wordpress theme I bought but their support is terrible. On every post page, I receive this error: Warning: preg_match(): Compilation failed: unknown property name after ...
0
votes
0answers
6 views

Changing a button label of WP_Customize_Image_Control() doesn't take effect

I tried to modify the Customize Image Control class and replace the instance of 'default' => __( 'Default' ) with 'default' => __( 'NEW LABEL' ) and re-classname it like this: class ...
0
votes
0answers
13 views

How do I add files into a new folder and keep wordpress page /slug/?

We needed a sub-site on our domain so it would look like domain.com/newsite Due to the instructions of a technician looking after the server, I made a new subsite under my wordpress site by the ...
0
votes
1answer
23 views

Include Class File in Wordpress

I'm including a Class file in functions.php file require_once get_template_directory() . "/core/classes/General.php"; require_once get_template_directory() . "/core/classes/User.php"; When I do ...
0
votes
1answer
29 views

Posts with Custom Fields does not appear

Plugin used: Types I have created posts with Custom Posts and the regular Posts by Wordpress. However, the custom posts does not appear on the website. Only the regular posts appears. Here I have ...
0
votes
2answers
27 views

How to run a php file that uses wordpress functions from command line?

I am using wordpress functions in a custom php file including wp-load.php, run from browser it is fine, but run from command line with php /path/.php wp-load.php causes problems: Warning: Cannot ...
-1
votes
1answer
17 views

How can I edit the WooCommerce Mini DropDown Cart to read as follows

Currently, this code returns "Quantity x Price"... so e.g. 2 x £3.00 <?php echo apply_filters( 'woocommerce_widget_cart_item_quantity', '<span class="quantity">' . sprintf( '%s &times; ...
-1
votes
0answers
26 views

WordPress Gravity Forms - Storing Gravity Forms data in JSON format in MySQL DB [on hold]

So I've worked this out a little bit and now I've hit a bump in the road. I am working on a record keeping site for registering people and making records of personal data. Each new record or update ...
0
votes
1answer
27 views

How to set up an auto delete post?

I want to create a form in which when a front-end sets a date and on that date the post gets automatically deleted. Is it possible?
1
vote
1answer
27 views

Subdomains with almost the same content

I have to create a website for a client. This client sells different products, and wants to enhance their view. The best way I thought about was to create subdomains, for example product1.domain.com, ...
-2
votes
0answers
5 views

Woocommerce: How to display products category grid on the same page with products

I am really a total newbie, i am trying several hours to get this done, but my knowledges are pretty low..so please, help! :) I have a page from which i can go to certain shop category. But those ...
1
vote
1answer
20 views

Create Gallery using Custom Post Type and add sum gallery as sub gallery of Main Gallery

Can any one give some idea how to proceed to create gallery for custom post type and add some gallery as sub gallery of Main gallery ? So any one click on Main Gallery than Sub Gallery of that will ...
-1
votes
0answers
37 views

Woocommerce change price for shipping country not working on checkout page [closed]

I want to change the price for the country with the code 'CH'. My product ID is 7753, the id of the cart page is '5082' and the id of the checkout page is '5083'. Everything works fine for the ...
-2
votes
0answers
16 views

Adding a custom registration and login system for WordPress site

I have created a user registration and login system and they are working perfectly on their own. I have four php files. Index.php that checks if there is an active session and displays relevant ...
0
votes
0answers
13 views

Query custom post in tag archive

I created a custom post and added the standard Wordpress tag functionality: function btp_work_register_post_type() { $args = array( 'label' => __('Works', 'btp_theme'),'labels' ...
-1
votes
2answers
32 views

Woocommerce linking variations

So I have this array (just taking an example, it's dynamically built up): $v_values = array( array("C1","C2"), array("F1","F2") ); $v_name = ...
0
votes
1answer
23 views

Override get_template_directory() in child theme?

Is it possible to replace a get_template_directory() in my child's functions.php file? I want to make changes to the file: /** * Load Custom Post types file. */ require get_template_directory() . ...
0
votes
1answer
21 views

How to fix custom queries? & Problem with if statement [closed]

2 really strange problems which are relevant each other a) I'm using a custom theme and I have create this function in order to point the right the header for each devices...is_mobile() function is ...
0
votes
0answers
5 views

Hiding Canvas-WooThemes layout 'General Settings' in WordPress backend [closed]

I'm trying to remove Canvas' 'General Settings' custom postbox in the back end of the post. Duplicating the code I used to successfully hide the slugdiv, I have been trying to no avail to hide the ...
0
votes
2answers
15 views

do_action(), iFrame Gets Displayed Despite Password Protection [closed]

I'm using Advanced Custom Fields and Content Protector plugins in trying to protect an iframe for eventbrite ticket registration that gets displayed through Event Calendar plugin. I believe I'm ...
0
votes
1answer
32 views

Jquery function working in Dev Console but not otherwise [duplicate]

Can someone help me utilize native wordpress jquery to run my function? The only working test i have done is to load an external jquery resouce via the chrome dev console and then add my function to ...
0
votes
0answers
25 views

Rewrite a 'page' URL based on query string parameters?

I have read several article here but I can't get out of this problem. For some reason we need to generate dynamically some page that represent our catalog. I need to change an url like this ...
-1
votes
1answer
56 views

Woocommerce change prices for a certain country [closed]

I want to change the prices (e.g for switzerland CH) and add an amount to all the prices.. I have this for my functions.php, but it does not work... add_action( 'woocommerce_change_price' ); ...
0
votes
0answers
14 views

Redeclare fatal error for PHP script in plugin when also in active theme

I'm developing a plugin and would like to include Aqua Resizer. However, when the active theme also uses the script, I get a fatal error: Fatal error: Cannot redeclare aq_resize() (previously ...