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

learn more… | top users | synonyms (1)

0
votes
1answer
28 views

How to change <html lang=“bg-BG” , but only for one page

I spent last 4 hours searching for an answer how to change html lang="bg-BG" to html lang="en-GB". I already reviewed the old topics, and it seems that define ('WPLANG', 'xx_XX'); is not working ...
1
vote
1answer
16 views

How to use copy() function and paste file in /wp-content/themes directory

copy("http://localhost/medium/theme.zip","themenew.zip"); currently it is pasting file in wp-admin folder, Is there any way I can copy .zip file to /wp-content/themes directory. Thank You :)
1
vote
0answers
17 views

WordPress Quick Question . How to Get Parent Link in Submenu in My Code

I'm creating a menu walker from foundation 6 but problem is parent link is not click able, so solution might be that if we can get parent link in submenu but have some problem because I'm don't know ...
-2
votes
0answers
17 views

Fetching trash iteam while export

Hello All i have customized visual form builder plugin as per my requirement, I developer custom option like admin user can export the entries as pdf export of the submitted form (As default it has ...
-4
votes
1answer
32 views

How do I link the side images?

This is my site: http://classichits.ie/ I want to link the background image to another page. This is the code I have so far: body.boxed-layout { background-image:url(<?php echo ...
0
votes
1answer
23 views

form built dynamically with php, not submitting

On one of my wordpress admin pages, I am building a form to add new mailers. I have it checking the templates mysql table and building the list of available templates, then also giving it the option ...
0
votes
2answers
23 views

Commenting out unwated CSS/scripts in HTML with PHP

I am trying to comment out unwanted CSS and JS files to prevent them from firing in the HTML by creating a simple function in my functions.php. So far I have: function commentStuff() { $stylesheet = ...
0
votes
0answers
18 views

Keep getting PHP memory error

I'm building my custom menu on my WordPress/WooCommerce site and I'm only about 20% done with the number of links I need on the menu. However, now I just get a PHP memory error when I try and save ...
1
vote
0answers
36 views

Get the date of the className or classID

Is it possible to get the date of the class name or class ID? I just used the following to get the date of the post, but there are image galleries and each image has a different upload date: echo ...
0
votes
1answer
32 views

Renaming “Expand Details” within “Add Media”

I was wondering if it was possible that the "Expand Details" option via "Add Media" can be renamed? I couldn't find a guide online so I thought I would ask here for guidance, (that's if it's ...
1
vote
2answers
27 views

Custom plugin: Trying to show saved data on frontend

I'm working on my first plugin and I have made a nice settings page which saves and works. But I have split it to few files and now I can't determine if field is checked.. I have also tried ...
1
vote
1answer
32 views

How to run PHP code in Text Widget with no plugin in WP 4.4

Before I had the following code in the function.php add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ob_start(); ...
1
vote
0answers
23 views

Importing Product Variation Images Swatches

I want to upload several thousand variable products to Woocommerce using the WP All Import plugin. I also want to display product variations using the Color or Image Variations Swatches plugin, which ...
0
votes
0answers
33 views

How to limit number of words per line?

My theme info : Newspaper Ver 6.0 My problem : I want to limit number of words (say like 5 words per line for example) in a line in my content area. I'm not intending to add any h2,h3,bold texts, ...
0
votes
3answers
38 views

I installed Wordpress locally now how do I login?

I downloaded a WordPress website that I am modifying for a friend. He gave me access to cPanel, where I downloaded the SQL and changed it on XAMPP. Now when I open >localhost/wp it opens the ...
0
votes
0answers
15 views

Upgraded to WooCommerce 2.4, single product page is dying after displaying title

This issue started when I upgraded from WC 2.2 to 2.4. I just upgraded to 2.5 and I'm still having the issue. For some, but not all products the single product page dies after displaying the post ...
0
votes
2answers
37 views

Post to WordPress from another Server via PHP

I have running a wordpress site on - lets say - "site.com" and another site "input.com" hosted in completely different locations. As the name suggests, "input.com" should be used as a input site with ...
1
vote
0answers
13 views

How to assign a customer to an order?

I have a problem assigning a customer to an order using a php script. Is it even possible? I know, that it is possible to get the customer ID back from the order, but I can't find a way, how to set ...
0
votes
0answers
20 views

2 different Home Pages for different language url part

I'm in trouble with multilanguage site I would to have for all pages under url www.example.com/EN An EN HOMEPAGE and for www.example.com/IT another HOmePAGE. How can I dot this? I already know this ...
0
votes
1answer
15 views

Querying for specific tags

I currently have this code that pulls all of the tags and creates a list with links for them: <?php $tags_array = get_tags(); foreach( $tags_array as $tag) : $tag_link = get_tag_link( ...
0
votes
0answers
16 views

Lazy loading Ajax offset not working

I am attempting to create a lazy loading ajax feature on my site. There is a 'click more' button which will then load 10 posts via ajax and append them to the HTML container. I want to display 10 ...
0
votes
2answers
24 views

using the_permalink to echo an href into a <li>

I'm trying to make a menu that automatically populates from a custom post type I have and I'm having some trouble getting it right If someone could point me in the right direction I would greatly ...
0
votes
0answers
13 views

#1062 - Duplicate entry '1' for key 'PRIMARY'

I am trying to move my database from my usbwebserver to my online server. But I get this error, can anyone help me with this? #1062 - Duplicate entry '1' for key 'PRIMARY'
1
vote
0answers
13 views

Output custom field value to post string

I am trying to get a custom field called "u-courseid" its a field that was created by a theme plugin. My goal is to output the value of this field after the post name. So the output would be " Post ...
0
votes
1answer
30 views

Accessing an image via ajax

The goal with this is to create a random banner, managed in the wp admin. I can create a banner solution in the wp admin without an issue but need a little help on the ajax side. I have an image ...
0
votes
1answer
9 views

Get posts associated with media attachment

Is there a good way to find all posts that contain a specific image? I'm working on the attachment single template, and I'd like to list the posts that contain that image.
1
vote
1answer
51 views

Remove Woocommerce product link

I'd like to remove the link from the Woocommerce product listings. I don't need the user to see the product detail pages, we are going to use Quick View instead. Anywho, I have been searching and ...
0
votes
0answers
8 views

Count of Custom Attribute - WooCommerce

I would like to put a a message to say "available in other colors" on the category page if there is more than one color you can select on the product. Right now I have some code in content.product.php ...
1
vote
0answers
13 views

Audio Player not loading when the content is loaded through Ajax, MediaElement.js no applied

When I load the content using ajax it doesn't apply MediaElements.js to my audio player, so the audio isn't display. I think this is because the MediaElement.js is loaded with wp-footer(), and this ...
1
vote
0answers
28 views

How to pass “get_the_terms_list” as shortcode to Visual Composer Grid Builder

I am trying to create a shortcode that returns the term list inside of Visual Composer's Grid Builder. I have read the docs here. My code is as follows: add_filter( 'vc_grid_item_shortcodes', ...
1
vote
0answers
20 views

How to exclude a widget from page 1 of a paginated post

I want certain widgets to not appear on page 1 of a paginated post but appear on all other pages (page 2,3..so on), and some other widgets to appear on only appear on page 1 and not the rest of the ...
0
votes
0answers
9 views

Can't see audio when I acces with ajax

I have created an ajax portfolio. It works fine, but when I upload an audio, this is not display. If I acces to the post via my blog page the audio is there. I inspect this file and I discover a ...
1
vote
1answer
18 views

Push metadata in array

Applying meta keys in search result Since I need to take on a different approach to get my data in javascript from wordpress, I am trying to apply (as follow up on my post earlier today ...
-1
votes
0answers
22 views

Arabic preview page changes problem: Oops! That page can’t be found

After installing Polylang plugin to add Arabic language for my website, I added the first page with Arabic title and body. After publishing this page and clicking the "Preview Changes" button, I got ...
1
vote
1answer
39 views

How can I output a php value into a JS file within Wordpress?

I am trying to use get_theme_mod option from php to load into my js file. I've used wp_localize_script to convert. The tweet_id is where I need to place the $tweet value outputted. Any help would ...
1
vote
1answer
23 views

How to edit widget code to add unique class name to each div?

Code from existing widget: $get_featured_pages = new WP_Query( array( 'posts_per_page' => -1, 'post_type' => array( 'page' ), 'post__in' ...
0
votes
0answers
29 views

how to create wordpress page using php and mysql

Hi I want to create wordpress page but without using any wordpress built-in functions i.e. like wp_insert_post.I tried using xmlprc and curl but got no luck achieving it.So,now I want to directly ...
0
votes
1answer
42 views

Dynamically adding filters

I have a function that I'm trying to get an array in it to use in a callback to dynamically add filters. Here is the function that I need to retrieve the array keys from ( in the $classes variable ): ...
1
vote
1answer
38 views

My new button is in the wrong place

Initially, I was trying to have the "Add to Cart" button change to "Make an Inquiry" based on the condition of availability and whether there was a price inputted, or not. I kind of got the ...
0
votes
0answers
21 views

How to print from this Wordpress object?

I'm just trying to get the number of posts from a custom post type but I think a more pressing issue, for me, is that I'm not sure how to retrieve specific information from returned Wordpress objects ...
1
vote
0answers
24 views

Can't find infinite loop cause

I am working on the below function which will eventually create a set of posts based on meta data entered into a "parent" post. I'm running into an infinite loop when hitting the save button, which I ...
0
votes
0answers
21 views

Dynamic variable in add_rewrite_rule

I'm trying to insert dynamic part of URL in add_rewrite_rule() when activating plugin. I have a config array $config = array('rewrite_key' => 'whatever'); and a function which do some stuff ...
0
votes
2answers
23 views

Security: blocking direct access of php files

I found 2 ways to block direct access to php files (although it's not always necessary, see http://wordpress.stackexchange.com/a/63004/60539) The first one is: defined( 'ABSPATH' ) or die( 'No script ...
0
votes
0answers
27 views

WooCommerce - Variable product to display default form value

When you visit the shop page, there is multiple variable products which have the standard WooCommerce price range before you visit the single product page (£1-£999). I have seen lots of php code to ...
-3
votes
0answers
35 views

What's the earliest version of WordPress that works with PHP 5.6?

Our hosting company is (thankfully) upgrading to PHP 5.6. I need to find out which (if any) of our clients' sites need updating to be compatible. What is the oldest version of WordPress that supports ...
-2
votes
1answer
15 views

Blog listing not showing dates for every post and arrow missing off image

I am trying to get the blog to appear the same as in the first post but for some reason the date disappears and so does the arrow on top of the image. You can view my site here. The current code: ...
0
votes
0answers
6 views

How to add a new property to an existing object dynamically in php? [migrated]

I am new to php, T am trying to add a new property onhold to my object. $designation is object array coming from data base. foreach ($designation as $key => &$value) { $result = ...
1
vote
1answer
93 views

Page navigation not showing even tho it should

EDIT: I replaced the pagenavi which is not native to wordpress with the_posts_pagination. Now i get no pagination at all, it just shows the 4 posts how it's supposed, but no pagination (yes i have ...
0
votes
0answers
63 views

Wordpress compatibilty with new Xampp: PHP 7.0.1 MariaDB

I used to make brand new Wordpress installations on Xampp on Windows 7 as default development environment. Yesterday I decided to try Windows 10, so I made a fresh installation of the OS. Looking for ...
0
votes
1answer
30 views

wp_delete_post deletes all posts instead of just expired ones

I am trying to set up a cron job which deletes posts which have past their expiry date (i.e expiry date < today's date). I have a meta box on the custom post type which adds an expiry date to the ...