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

learn more… | top users | synonyms (1)

0
votes
0answers
35 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
16 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
41 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
16 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
23 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
25 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
32 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
67 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
9 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
1answer
42 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
21 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
41 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
26 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
33 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
43 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
39 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
22 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
25 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
28 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
42 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
16 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
95 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
75 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
31 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 ...
0
votes
1answer
18 views

Filtered table in wordpress

I am Developing a alphabetical filter table in wordpress template. But filter is not working may be because of code below. if($char) { $results = $wpdb->get_results( "SELECT * FROM ...
0
votes
0answers
8 views

Generate custom output for page/URL in a plugin

In my plugin, I want to be able to catch a slug - say 'testpath', as in www.mysite.com/testpath and output whatever I want from my plugin into the page. I in WP Admin I could create a page called ...
0
votes
1answer
25 views

Keeping the previous get value and add another value when submitted

I'm a super noob, so I'll try my best to explain. I have a blog page that I wanted filtered by category and I want the user to able to click on multiple categories and it will filter to show those ...
-1
votes
1answer
60 views

Passing javascript variable to php file

I can't find the best way to pass a JavaScript variable to use in a PHP file. I found this function wp_localize_script(), but it does exactly the contrary. Is there a way to pass a JavaScript ...
0
votes
1answer
13 views

If user is logged in not working

So I am trying to check if a user is logged in with the default WP function but it doesn't seem to work. Oddly, it works fine for people logged in (it echoes as it should) but it echoes nothing for ...
0
votes
2answers
29 views

load ajax using admin-ajax.php

The append result is 0, instead of a list with the title ass a link. If I check this locally (http://localhost/wordpress/wp-admin/admin-ajax.php?action=lateral_fluid), I get the titles ass a link. I ...
1
vote
0answers
20 views

bulk change of image setting “link to” to “link to: image url ”

i want every image present on my wordpress site with setting "link to: none" or "link to: post url" became in "link to :image url" ho make this for old post and for new post ? i tried this code in ...
0
votes
0answers
17 views

How to add a query string to all images?

My ISP has a cache server that cache all images and cause some problems and get on my nerves. So I decide to add some query string at tail of all image URL to prevent ISP to cache. Now I use this code ...
1
vote
0answers
15 views

Individual testimonial taxonomy not displaying (white screen)

I am using a testimonials plugin which is working fine except for when I try to view the testimonial entry as an individual page The plugin author suggested changing the testimonial slug and updating ...
0
votes
0answers
33 views

How send simple push notification from php in android

I want to send android push notification from php. I have created admin in php & mysql when admin approve anything from admin than send notification to user.
0
votes
1answer
18 views

Submitting my form to the database and then redirecting to payment site

I am submitting data to my custom table and would then like to redirect to a third party who will handle the payment. (not PayPal). I have the following code which adds the data to the database. The ...
0
votes
0answers
15 views

how to add description in custom photo wordpress, from front-end

I have an item block in fron-end, with it i uploud custom images, i want to add short description, that will look like this
0
votes
0answers
25 views

Can anyone explain this Widget output code?

I'm trying to read and understand a widget from a Wp theme. This widget basically allows the user to display up to 3 featured pages with their corresponding featured images or thumbnails. I ...