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

learn more… | top users | synonyms (1)

0
votes
1answer
35 views

Use html tags in shortcode_atts, is it real?

can i use html tags in shortcode attributes? like this: function b_text( $atts, $content = null ) { extract( shortcode_atts( array( 'text' => '<div class="myClass">DOM</div>' ...
0
votes
0answers
19 views

Add product of where price is based on # of items in cart

For a client I have to achieve the following: When a client buys a product he has the option to customize it. For one product the additional costs are $500, but when he buys more than 1 product, ...
0
votes
1answer
32 views

Using catch_that_image() for galleries?

I'm currently in the process of creating my first custom wp theme, in which the post contains the title, the content, the gallery, and also a div in between the title and content where as a ...
0
votes
0answers
14 views

Isolate Sub-Category from Top Category in WooCommerce Cart (Exclude others)

This is my first post to SOWD. I have the following function that adds custom fields for a given product category if present in the cart - in the example below, the product_cat is 123, which is a ...
0
votes
0answers
26 views

Simple modification for menu structure

I'm trying to make a menu for my website, but I want it to be easily modified through original WP menu(dashboard > appearance > menus). I want to add some small thing to the structure of my menu, ...
0
votes
0answers
92 views

Get and Display Content in wp_editor

I am building a simple plugin where I display a visual editor in the backend. My Code looks like this: $content = ''; $editor_id = 'ssp-editor'; $settings = array('textarea_name' => ...
0
votes
1answer
10 views

Storing content into a custom taxonomy

Currently I have created a custom taxonomy with the name "genre" and I am wondering how I can include it into the array for posting with the content from the string provided in the example. $my_post ...
0
votes
0answers
17 views

Meta Box not being added in plugin

I am attempting to create a simple oop plugin that registers a few custom post types and then adds meta boxes to that custom post type. It is currently adding the post type but it's not adding the ...
0
votes
3answers
44 views

Moving code from theme header to functions.php

Just wanted some advice in relation to adding some custom code to my wordpress site. I am using geoip to check a users country code and redirect them to the relevant site when they land on my ...
0
votes
2answers
86 views

How do I display Category titles on a WP Page?

I am trying to get a list of my Wordpress categories to display on a Page, but haven't cracked this yet. So far, I have been able to create a custom category page (category-categoryname.php), to ...
0
votes
1answer
30 views

Trying send mail from Theme page

I am trying tos end a mail and parse its contents using WP_Mail but the email is not sending im just not getting error message on the page. Can someone tell me if their is something wrong with my ...
0
votes
0answers
27 views

video preroll vimeo in wordpress

Hello guys I would like to integrate an open source code taken from github to my wordpress theme. link: Vimeo Pre-roll This is the code of my video.php, I would like to work with vimeo. code: ...
0
votes
1answer
35 views

Can form entries from a WordPress form go to a database

I am using Wordpress 4.3.1. I have built a stand alone form (form 1) using PHP where one can enter volunteering tasks doable in a city, has fields like volunteering activity, city, state. The values ...
1
vote
1answer
57 views

CPT + CMB2: data not displaying for only first post in loop

I've a CPT incorporating CMB2. I loop through every category and show each post within that category. My issue is that the first post in each category doesn't display certain info from two metaboxes: ...
0
votes
1answer
155 views

Print Woocommerce product price on cart page

I can access subtotal or total price via like this: $woocommerce->cart->get_cart_subtotal(); But I tried to $woocommerce->cart->product or $woocommerce->product->price then echo, ...
0
votes
0answers
26 views

How to retrieve value from Gravity Forms input and put it in template?

I'm trying to retrieve and input from my Gravity Forms form and put it into a template file. I know I have to use gform_after_submission but I am not sure what I am doing. This is what I have so far: ...
0
votes
0answers
65 views

Use URL query string in img src attribute

I'd like to display images of my custom fonts on my (private) WordPress site. The font-creation website I use, FontStruct, has a URL-accessed tool for rendering a line of text in a specific font. ...
0
votes
1answer
47 views

PHP Warning: Missing argument 2

From ajax Im updating a custom user field and visualising proper content using a shortcode. localising jquery function localise_jquery1410() { wp_enqueue_script('jquery'); wp_enqueue_script( ...
0
votes
2answers
43 views

How do I put the homepage link inside the php _e code?

How do I put the homepage link ? Right now it's not correct. <p><?php _e( 'The page you are looking for is not here. Why don’t you try the <a href="<?php echo esc_url( home_url( ...
0
votes
1answer
19 views

Why BuddyPress fields not saving?

I have a Wordpress+BuddyPress site. I added some extra fields in user profile. When i registering user i fill all fields on register form. After i do redirection in user profile: function ...
0
votes
1answer
21 views

Parsing Menu Items and Blog Posts

Question 1 I'd like to be able to show or hide certain pages in the main navigation menu based on whether or not they have certain prefixes in their title. This is mostly for the purpose of language ...
0
votes
0answers
40 views

Include ACF field in other plugin option page

I'm using Advanced Custom Plugin. I can get the field's output via export option. My field like this: if(function_exists("register_field_group")) { register_field_group(array ( 'id' => ...
2
votes
2answers
136 views

Display 4 chronological posts starting with a random post

I know that I can display 4 random posts by doing something like: get_posts('orderby=rand&numberposts=4');   What I'm trying to achieve is starting with a random item, but then showing ...
0
votes
1answer
83 views

There is no existing custom fields' value in functions.php

I'm using WooCommerce and Advanced Custom Fields plugin. I have a function for calculate my product's discount, like this: function woo_add_cart_fee() { global $woocommerce; $discount = ...
0
votes
1answer
22 views

'posts_per_page' in costum page type

i have a problem with the 'posts_per_page'- no matter that i set it to, e.g 10 or 0, it always only show one post! <?php $loop = new WP_Query( array( 'post_type' => 'producenter', ...
0
votes
0answers
12 views

Correct way to update wp_script() url/src? [duplicate]

I tried to update the url/src of the queued $wp_scripts correctly... my aim is to use just relative paths. Therefore I: loaded the $wp_scripts replace the domain and saved the output. But it seems ...
0
votes
0answers
14 views

display two foreach

how can I display the quantity and name when I check the checkbox and input number on quantity? this the code: input type="checkbox" id="m1" name="prod[]" value="Pork" label for="m1" Pork (100) ...
0
votes
0answers
45 views

select drop down list php code

how to create a select drop down list and refuse the same selection to be selected twice with time drop down list.. here is my coding : <option name="Time" selected ...
0
votes
0answers
8 views

Filter postypes per user in admin list page CPT

I am using the following to limit my custom post type to just one record per user but how do i limit it per role as well as I still want the admins to be able to add multple players. I not sure if ...
0
votes
1answer
26 views

Best way to create a user programatically

I want to create a user via a standalone script. I want an activation email to be sent out, in the same way that it is when a user is created from the Add User screen. An email is set out with a link ...
0
votes
0answers
46 views

How to put php code inside a tag loop?

I have something like this. The loop is from the woocommerce plugin in the cart.php. I want to put the php code inside the a tag <?php echo wp_kses_post( wpautop( $data['display'] ) ); ?> ...
0
votes
1answer
112 views

Wordpress media upload “HTTP error”

When I try to upload an image, I get the following error: HTTP error. I know this problem has been solved hundred times but I can't find the right answer form my configuration. In the php.ini, I ...
0
votes
0answers
21 views

ACF field get blank

Create a custom field. Its kind of datepicker and field name is start_date It is used in a spesific Wocommerce product category. Then I want to use in my WooCommerce single theme. So put this code in ...
0
votes
2answers
100 views

Disable email notification after change of password

I want to disable the emailnotification if a user or an admin changes the password of a user. After some Googleling I came to find that I need to create a plugin and overwrite the ...
0
votes
0answers
19 views

How to alternate (flipped css) when displaying a list of posts?

I have a list of posts that look like this (simplified for question): [] Cat 1 ... Title1 list of posts 2 3 4 5 [] Cat 2 ... Title1 list of posts 2 3 4 5 [] Cat 3 ... Title1 list of posts 2 3 4 5 I ...
0
votes
1answer
23 views

uploading a new theme to live server

i've to change live version of a theme from live server.i'm given root folder of wordprss which contains all the folders of wordpress itself alongwith all the theme files and plugins etc and of ...
0
votes
2answers
95 views

Add `datetimepicker` to form

I have a form where i would like to add a datetimepicker(). I must be doing something wrong. I have done the following: In my header.php <?php wp_enqueue_script("jquery"); ?> In my ...
0
votes
0answers
35 views

How to block a script from loading based on the source

For a plugin I am developing for a company that is active in both Europe and Asia I am trying to block certain plugins and scripts from loading for visitors that are located in China. I have been ...
0
votes
1answer
27 views

Update only some custom user fields

I have created multiple user fields. These fields are only managed by the administrator to add additional information about the user Now the rules have changed. The users must gain access to their ...
-1
votes
1answer
277 views

Allow users to download media files directly from Amazon S3 (AWS plugin)

A site I'm working on hosts an image library we encourage users to download files from. We're using the AWS plugin by Delicious Brains to host our static content on a separate server from the main ...
0
votes
0answers
25 views

wp_delete_comment is doing nothing

I'm using front page delete links for users to delete their own posts and comments. The links are generated on the page like this : <a href="#" data-id="<?php the_ID() ?>" ...
1
vote
3answers
905 views

What is the best php version to use with WordPress?

What is the best php version to use with WordPress... without going over the top.
0
votes
1answer
74 views

Woocommerce custom Plugin in wordpress [closed]

I want to access the ID of the product currently being displayed on the page. I am trying to do this in a separate custom plugin. I have tried global $post and global $product and get_the_ID() methods ...
-1
votes
1answer
48 views

changed front-page template gives 500 error

I need immediate help regarding WordPress website. i had to make some changes to the home page so i just download front-page template and what i did is made some changes just moved some blocks up and ...
0
votes
0answers
12 views

How does WordPress have dynamic linking?

I am learning dynamic linking in PHP. Please explain me Dynamic linking in in PHP with respect to WordPress. Thanks
0
votes
0answers
318 views

How to Fix Wordpress 500 Internal server error due to custom post type

I am using couponXL theme for my site. Everything is working correct but except one ie., custom post type. In the theme , there is a plugin called CouponXL custom post type. This plugin is included to ...
2
votes
2answers
87 views

Which ways can be used to log in to Wordpress?

FYI: This has been also posted here since I'm fairly new to this website and didn't know that the Wordpress part existed. Sorry for the repost. I'm currently trying to tighten the security for a ...
0
votes
0answers
119 views

Image rotation issue (horizontal picture uploading as vertical) — Exif issue?

I am building a classifieds site on WordPress where users can upload their ads/images from front-end. However, when horizontal pictures are uploaded, they upload as vertical. I looked into the issue ...
0
votes
0answers
53 views

Add and remove fields

I'am trying make a wordpress widget. It should add an remove field on click, but it doesn't work. Another field will not displays on page. Can you help me please? (sorry for my english, I am not very ...
0
votes
0answers
31 views

Form submissions not posting to database / displaying in dashboard

In the process of building a simple contact form plugin. For some reason - the data from the form submission is not being posted to the database /and or displaying in the WordPress dashboard. If ...