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

learn more… | top users | synonyms (1)

0
votes
1answer
21 views

Return array of values in php

So, following is used in a shortcode: [my_shortcode dfd_name="Steve"] if(strstr($key, 'dfd')) { $metaquery[] = array( 'key' => $key, 'value' => $val, ...
0
votes
0answers
8 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
10 views

directorypress theme error mysql_error()

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
16 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
2 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
12 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
22 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
0answers
23 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
23 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
20 views

WordPress Gravity Forms - Storing Gravity Forms data in JSON format in MySQL DB

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
26 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
22 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
4 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 ...
0
votes
0answers
13 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
29 views

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

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 ...
-1
votes
0answers
15 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
11 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
31 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 [on hold]

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 [on hold]

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
14 views

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

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
31 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
54 views

Woocommerce change prices for a certain country [on hold]

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
13 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 ...
0
votes
1answer
13 views

Editted Theme Files Get Updated/Reverted Every So Often

I have editted my WordPress theme php files; I am using the Enigma theme and I have editted files such as; front-page.php home-slideshow.php Everything works fine but every so often these ...
0
votes
0answers
8 views

A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control

Are you familiar with the Customizer core $wp_customize->get_setting( 'header_textcolor' )? It will become available once you add_theme_support( 'custom-header' ). It have two controls, one is a ...
-1
votes
0answers
19 views

How to create a new wordpress plugin [closed]

I want to create a WordPress plugin to save the enquiries from a contact form to a url format. Also I need to send this url to another website.
0
votes
1answer
16 views

extract url from a hyperlinked string in PHP [closed]

I need a function to extract the link (url) from a hyperlinked text in PHP. For example i get it a string and it returns me the link or url. Thanks before for your answers...
0
votes
1answer
32 views

How do I get the index for a custom post?

This is kind of a different request, but my client wants the index of a custom post type. Basically for a regular post, they can select 1 custom post from a list in a custom field to "attach" to the ...
-1
votes
0answers
16 views

Call Woo order id and total into tracking script in head? [closed]

I am not asking for much, I don't think... That being said, I simply need to know how to call a Woo Order number and order total into the script that sits in the head of the order completed page. ...
0
votes
0answers
3 views

Set the transport of the Customizer 'header_image' core setting to 'postMessage'

To activate the Customizer core section Navigation (ID: nav), you need to: add_theme_support( 'custom-header' ); I already tried to make the transport of the Customizer header_image setting ...
0
votes
0answers
25 views

Changing page's name after page creation

I have a page, I can't know the name of the page before doing an elaboration with PHP, i thought about changing the page name with javascript after discovering the page name, I have not written the ...
0
votes
0answers
15 views

Display code in curly brackets

I have this working code '<div class="title">'+{ifset $item->post_title}{$item->post_title}+{/ifset}'</div>'+ I need to use {$item->post_title} in the following code ...
0
votes
0answers
10 views

Trending Tags based on post views

I'm looking to display a list of the most trending tags on my wordpress blog - based on views that the posts within these tags have had, with a max tag count of around 10. I've looked into the ...
0
votes
1answer
35 views

How to display meta_value array?

I'm trying to put together a list of all posts where the metadata matches a specific query. It appears to work fine until I try to output the data, at which point it is repeated continuously. I ...
0
votes
1answer
27 views

Conditional Placeholders Wordpress Event Manager [closed]

This is in reference to The event manager plug-in for wordpress, using conditional placeholders. In my event-single.php, i'm having trouble getting #_CONTACTPHONE and #_CONTACTURL to only show up if a ...
0
votes
1answer
21 views

Debugging WordPress with xDebug

Until now I was using a local WordPress project and I was able to define the xDebugger in the php.ini file, it's very useful and helpful. But now I'm connected to a remote server and I only have the ...
4
votes
1answer
63 views

wp_set_object_terms and arrays

I need to add a category to about 2500 posts, and either need to use an SQL query or wp_set_object_terms with PHP. I'm looking at wp_set_object_terms so I can add a category and not impact the ...
1
vote
1answer
53 views

Duplicates with WP_Query loop

I'm showing on my front page only posts with featured image. My problem is that on every next page load I receive the same results aka getting duplicates. I'm using ordering by custom field. Any ...
0
votes
0answers
24 views

How does the WordPress URL Routing work?

I would like to try and mimic how WordPress has their URL routing system designed, only a much more simplistic level. Can someone help me understand how they have their routing system designed so that ...
0
votes
0answers
16 views

Add search box in Bootstrap slider carousel

I'm using the Wordpress theme 'evolve' which uses a Bootstrap slider on the front page with a 'Learn More' button on it. How do I add a search box instead of the 'learn more' button which will ...
1
vote
1answer
34 views

Where in PHP do I move title and meta (date) to bottom of each blog section?

I'm working on a Divi site that has two blog grids on the home page. I need to move the title and the date of each blog section to the bottom (below the blog text). <div ...
0
votes
1answer
35 views

Wordpress call post-ID in jquery

I explain the situation I'm having here: On my home page, I have a list of post being display. I've code to have like a modal box to share this post. Basically, on each post you have a button share. ...
0
votes
1answer
19 views

hook that when page is strating to load

I want to create a page loading message based on php when the wp page is starting to load. is there a hook about it? simply like opposite of wp_loaded? wp_loaded is after the page is fully loaded, I ...
0
votes
0answers
24 views

Why wont these thumbnails show up?

Here is a link to the Website with the issue. http://southernhighlands.com/homes/exclusive-listings/ Looking at the 1st thumbnail I can see it is linked to Notice: Removed http:// because I can ...
1
vote
1answer
15 views

Center and hide overflow of WP toolbar custom links

I have made 22 custom links in the WP toolbar for my site but when I reduce browser/screen width they are completely un-resposnive in terms of CSS and stack instead of simply not displaying links that ...
4
votes
1answer
89 views

How can merge two arrays values in one array and save in database

I am working on WordPress upload meta fields. When user upload images the images are sized in two dimension one is "thumb" and one is "big" and they re sized very perfectly. I save both of images ...