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

learn more… | top users | synonyms (1)

-5
votes
1answer
42 views

Undefined variable in functions.php file [closed]

I'm new to php and I'm trying to figure out why the following error is occurring: Notice: Undefined variable: post in functions.php on line 59 Here is my functions.php code: <?php // related ...
0
votes
1answer
34 views

Wordpress language switcher doesn't work

I am using WordPress version 4.4.2. The problem I am facing is, I can not change the site language form Settings -> General -> Site language. If I change the language and hit save, the ...
0
votes
1answer
39 views

Importing demo data in Multisite

I have a multi-purpose theme, which allow to download complete demo site content/wordpress. Normally (www.example.com) it's perfect and run all demo request, last time i install a new wordpress ...
1
vote
1answer
49 views

How to find error in my code when the error message is pointing to WP core file?

While testing a plugin of mine with 4.5 RC of WordPress, after turning on debug in wp-config.php, I noticed an error showing up in a core WP file Notice: Trying to get property of non-object in ...
0
votes
0answers
23 views

How can i implement “select from existing tags” for front end posting?

Hy,on the bottom of Tags: I want to add something to be able to select from existing tags. Something like on backend "Select from the most used tags" Here it's html and php code : case ...
0
votes
0answers
117 views

PHP Warning:fread(): SSL: Connection reset by peer in /var/www/html/wp-includes/class-wp-http-streams.php line 269

I have a WP website on an Amazon AWS Ubuntu server and the website keeps crashing, I think it happens when having a lot of traffic. This is the error I get as an output: ` [Mon Apr 04 ...
0
votes
1answer
23 views

Use variable in SQL statement

I have this: <?php $jerseys = $wpdb->get_results("SELECT order_item_id, order_id FROM wp_woocommerce_order_items WHERE order_item_name = 'Mystery Jersey'"); echo "<p>Jerseys</p>"; ...
1
vote
1answer
30 views

How to create a form and display its content as table in admin panel?

I am new to Wordpress CMS and have been into a problem and don't know how to go about it. The problem is I want to create a form with first name, last name, phone number and a submit button. On ...
0
votes
0answers
35 views

I would like to write the output of a function in normal post.php fields

I have this function, and it prints, displays these values ​​directly in the published posts: function gen_num() { global $post; $mixnames = get_post_meta( $post->ID, 'fieldnames', true ); ...
1
vote
1answer
73 views

My php header() function is not working [closed]

// Edit: I figured it out. Hours and hours of banging my head against a wall and it turns out all this needed was one simple line: ob_clean(); Somewhere in some included file there's probably one ...
1
vote
1answer
56 views

RecursiveDirectoryIterator not working in admin

my function below works error free when viewing the frontend of the website. But causes a fatal error when i login to the admin area. The errors say that it can no longer find the folder. //req all ...
0
votes
1answer
51 views

check whether a mail is send through contact form 7 using php

When the user clicks download button, a contact form should be opened, and when he submits it successfully, a file should be downloaded. I'm using contact form 7 for sending the mail. Is there any ...
5
votes
1answer
340 views

Nginx FastCGI_Cache Vs PHP Caching

I have been doing some experimenting with caching performance using loader.io and have been left with some puzzling results. I was originally on a shared host that used a LAMP stack. Even with ...
-2
votes
1answer
32 views

How to echo css class for a link? [closed]

I am trying to add a css class to this link in a plugin I am using. The plugin has the following code - echo "<a href=\"" . get_permalink() . "\">"; The css class I'd like to add is ...
0
votes
0answers
18 views

Date/Time Function Worked in February and Doesn't Fully Work Now

In February I wrote code using the Date/Time functions mixed with Meta Queries to show our event post type on this page. What is supposed to happen is that if the event hasn't happened yet, it shows ...
6
votes
1answer
181 views

Images all broken after migration and upgrade

I have upgraded a neglected Wordpress installation the was a few versions off. After the installation and upgrading multiple version, all of my images are now broken which were not before. Whenever ...
0
votes
1answer
32 views

How to review WordPress website php version compatibility?

My host is upgrading php version from 5.4 to 5.6. I cannot see https:// pages nor login wp-admin with the test sites to see issues. I've read somewhere that WordPress recommends php 5.6. BUT, I don't ...
1
vote
0answers
27 views

how to build this site on wordpress currently on ruby on rails? [closed]

I need a similar site functionality in WordPress/PHP. But this site is on Ruby on Rails. It's about females posting their success story(like tweet) by login from facebook http://www.ladybrag.com/ ...
0
votes
1answer
37 views

Custom CSV exporter - Cannot modify header information - headers

In my admin dashboard, i created a custom module for report filtering using custom queries. I need to add another functionality which is to export these results to CSV. I tried to create a very simple ...
0
votes
2answers
70 views

File Uploader - Upload without adding to Media Library

I have an admin form for a plugin I am making. However, there are a couple of fields I need to add where the admin need to upload a document or image. When these files are uploaded, I do not want them ...
0
votes
0answers
47 views

Adding product image to woocommerce through rss feed?

I'm trying to migrate thousands of products to woocommerce. I made a research and had success, using the code from this page here -> How to add product in woocommerce with php code. Unfortunately ...
0
votes
2answers
29 views

How can I use custom menus with a Bootstrap WordPress theme?

I have this 'primary' menu with a few items in the CMS, which I can list nicely with this PHP code: $args = array( 'theme_location' => 'primary' ); wp_nav_menu( $args ); The PHP outputs ...
0
votes
1answer
29 views

Getting a 404 on single custom post type page when using rewrite on a custom taxonomy

I am getting a 404 on my single custom post types whilst using the 'rewrite' option in the custom taxonomy. If I take the rewrite out the single page works but the custom taxonomy archive then 404's ...
0
votes
1answer
80 views

How to get subscription key or id using Woocommerce Subscriptions

I need to get the subscription key of a particular subscription to pass into a custom function. I have referenced the documentation where it shows how to get the key, but I have failed to integrate ...
0
votes
2answers
43 views

Links in footer section

I'm currently trying to the Wordpress page of a friend. He asked me that the footer section of the site shall contain to links with the names "AGB" and "Impressum" with lead to new tabs with the ...
-1
votes
1answer
17 views

Custom posts password protect

my site is highly based on clients and we want to have very strong password protection for a certain custom type post. We have a custom type post named "something" and here is it's declaration: ...
0
votes
0answers
33 views

Combine file rename function with file upload code

I have this code for upload files[images] : and I don't know how to combine with this function for rename file on upload from this post : File Rename function Thanks. case "window-image": ...
-1
votes
1answer
39 views

Pagination 404 on my index.php

I'm trying for days how fix pagination on index of my wordpress site. Pagination work great on category and other archive but doesn't work on my index clicking on the page numbers have a 404. I found ...
0
votes
1answer
25 views

Allow BBPress participant role to trash topics

I have a small project with BBPress roles, here is what needs to happen if at all possible. Participant Role Participants should be able to trash posts. Participants should be able to restore ...
1
vote
1answer
42 views

Click a radio button must set textfield value

I have these radio-buttons in my checkout page: <input id="95292" type="radio" name="GLSShop" value="95292" onclick="SaveShopID('95292')"> <input id="95064" type="radio" name="GLSShop" ...
0
votes
0answers
40 views

Benefits of Using Wordpress Methods over Straight SQL Queries

I am building a "wrapper" front-end for Wordpress. My thoughts were that simply using PDO to run all queries would make the processing much much faster. Of course what this means is that I miss out ...
0
votes
1answer
46 views

Woocommerce Product page edit

I am making a webshop with every category on another page. That's all done, but now I want to edit the view of the pages. So what you get for every product is: product image, product name, product ...
0
votes
0answers
36 views

Woocommerce subscription hook after renewal

I have a web store where users can purchase subscriptions (1 month, 6 months, 1 year). My store uses Woocommerce Subscriptions v2.0.8. What I want to achieve is when a subscription is renewed, I want ...
0
votes
0answers
17 views

Why Do I Still Getting Duplicate Rows in SQL?

I'm creating a Custom Freight System which stores the order and the products requested by the user into the WordPress Database. The Problem When I insert the product into the wp_my_custom_products ...
0
votes
0answers
93 views

Display form submit success message

I have created a user profile form on my website to allow users to edit their user details on the front-end. Below is the code im using which works and updates their details, however once they have ...
0
votes
1answer
28 views

Nginx WordPress and another Web app URL structure

I have got WordPress installed on my root example.com/ Website. Also I have another Web application that on example.com/my-app/ which has got ugly links like example.com/my-app/file.php?arg=value to ...
0
votes
0answers
20 views

WordPress Development Using WordPress BoilerPlate - Using Admin Form Submission

I'm trying to develop a simple 'contact us' plugin using WordPress Boilerplate framework developed by Tom McFarlin. I'm pretty new to development and hence this question is very basic. I've my HTML ...
-1
votes
2answers
65 views

How to create a loop that will display one post and stop?

I am trying to create a part on my wordpress theme that will only display one featured post. I have installed this plugin - https://wordpress.org/plugins/featured-post/ . I know I am supposed to ...
0
votes
2answers
82 views

Displaying theme options in css

I am literally pulling my hair out trying to figure this out. I have been at it for almost 12 hours now. Being new to PHP and theme development I am having a hard time understanding how to get ...
0
votes
1answer
28 views

ACF - How to set the menu order for the relationship field

So, I've got a relationship field where I select a certain amount of posts to show on the home page. What I am trying to achieve is to apply the menu order of the posts as they are in the back end so ...
0
votes
1answer
43 views

Creating an admin meta box to save post as pending

The workflow when using Wordpress to change a draft post to pending involves several clicks and button presses, especially on mobile So to simplify my process I would like to create a meta box that ...
0
votes
0answers
13 views

Multiplying shipping cost

My site is selling a monthly box of which you can order a 3, 6 or 12 month subscription, but the total price is collected up front through woocommerce. I would like to also be able to multiple the ...
0
votes
0answers
42 views

Create custom post type and content of custom post type display in a single product page of woocommerce

Code to create custom post type is here and it's working: $args = array( 'labels' => $labels, 'description' => __( 'Description.', $this->plugin_name ), ...
0
votes
0answers
37 views

Change Gallery Shortcode Image Size

I am developing a WordPress theme and have a few posts with galleries (displayed via Jetpack slideshow). Gallery example: [gallery type="slideshow" size="full" ids="1672,1682,1674,1670,1676"] ...
0
votes
1answer
30 views

A custom RSS feed link, how do I modify the XML structure?

I'm working on this website and I can not find where I can modify it. It has a different link, than regular RSS feed links. While a normal RSS feed looks like this websiteaddress.com/?feed=rss ...
1
vote
1answer
44 views

Wordpress php filter admin_body_class not working

I have the following function in a plugin I have built: static function filter_add_body_classes( $body_classes ) { $new_classes = array(); // Only when logged in if ( ! ...
1
vote
1answer
34 views

Anyone can register via backend

My question is simple. Is it possible to enable option "Anyone can register" with php function? Thanks.
0
votes
0answers
9 views

Woocommerce variants CSS targetting issue

When a user is not logged in, they will not see certain things. I've accomplished this with a php/css hack in header.php <?php if (!is_user_logged_in()): ?> <style> ...
0
votes
0answers
32 views

Woocommerce, insert attributes with php

I've created a php program to dynamically insert products into the Woocommerce library. I've some problems with the attributes of my products, I've two php variables. $attribute->titleIt - It ...
0
votes
1answer
31 views

Custom post type url Rewrite (conflicting with page url)

I have a website that has many different custom type posts. I want to use pages as parent templates for those custom type posts (listing all particular custom posts) For example I have a page called ...