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

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Workaround for PHP Limit for image upload: How to use a local installation to get images online?

I have the common problem while uploading images, that I get the fatal out of memory error. Fatal error: Out of memory (allocated 40632320) (tried to allocate 5120 bytes) in ...
0
votes
1answer
13 views

WordPress styling recent post

Trying to replicate the theme shown here http://i.imgur.com/k60YtiX.png. As you can see on the screenshot the first post is black and the second post is a grey colour. My progress so far is just at ...
0
votes
1answer
11 views

if user is admin display admin link and logout link else display logout only

Like the title suggest I would like to create a conditional with the ability to if user is admin display admin link and logout link else display logout only in wordpress. I have created this ...
0
votes
1answer
21 views

WordPress rating by views

I am trying to create a system much like the one on this website. http://i.imgur.com/0trw2c3.png What happens is, if the post has over 1,000 views it gives it a nice little icon above the featured ...
0
votes
1answer
12 views

Function returns post URLs rather than retrieving Facebook Graph API data

require('../wp-blog-header.php'); query_posts('&showposts=-1&order=ASC'); while (have_posts()) : the_post(); $url = the_permalink(); $json = file_get_contents( ...
0
votes
0answers
11 views

How to move posts in featured category on top and keep pagination

I want to move every post from category_id = 11 and 10 on top of the list and then query every other post which is only in 10th. I thought that making two loops will do the trick but there is a ...
0
votes
1answer
11 views

Registration form not registering First and Last name

I'm creating a custom registration form which works using username and email inputs, but when I include First and Last name fields it won't let me register. Here is the form: <form ...
1
vote
1answer
13 views

Add before_content and after_content to register_sidebar

Is there any way to add two new functions, before_content and after_content to the register_sidebar function? These would work like before_title and after_title, except it would wrap everything that ...
0
votes
0answers
6 views

E-Commerce Application integration to WordPress (Angular.JS, MySQL, PHP, Codeiginiter)

I developed the project (e-commerce application) and I used Angular.JS for the front end, MySQL, PHP and Codeigniter framework for the back end and Content Managemnet System. I did not use ...
0
votes
1answer
14 views

403 (Forbidden) delete file image in themer folder

I'm having trouble with permission to delete files that are within the theme folder. All folders and files are with permission 775 and there is no error in the code , because when I use the code in a ...
0
votes
0answers
19 views

PHP printing… PHP [on hold]

I'm currently troubleshooting a website whereupon the server is printing all of the PHP rather than executing it. Here's a sample of some of the front-facing content of the website: cat_name == ...
0
votes
0answers
10 views

Genesis / custom template page / setting the page title and meta desc

My WP site is running Genesis. I've just implemented my first custom page template in a child theme. The template runs some PHP and makes some data available to any page based on the template using ...
0
votes
0answers
8 views

Ajax is running my insert query twice

I am working in WordPress and I run a function to insert a row in database with ajax. Ajax runs but for some reason insert operation is performed twice. Below is my code Ajax jQuery(function ($) { ...
0
votes
2answers
22 views

Add categorys to custom post type not working

register_post_type("butik", [ "labels" => [ "name" => "Butik", "singular_name" => "Butik" ], "show_ui" => true, 'public' => true, 'rewrite' => [ ...
0
votes
1answer
15 views

Adding “redirect” to a button

So, I have the following code: <?php if ( I_delete_user($user_id) || $demo_site->request_verification($user_id) || isset( $args["{$template}_button_primary"] ) || isset( ...
0
votes
0answers
11 views

Use result of first ajax call to trigger another

I am working in wordpress. I have below form 1 which is a search form and when I press search I get results with ajax. Now the result rows have button or link which when clicked should trigger another ...
0
votes
0answers
4 views

How can I set a subsection page for a plugin e.g ?page=_&subsection=subsection_page

How can I set a subsection page for a plugin ? I noticed some plugins have 2 settings pages as follows: Main one: options-general.php?page=page Subsection: ...
0
votes
0answers
16 views

Integrate my site with Wordpress login system

Hello I would lite to use the login system from wordpress and use on my other project. I found this code: require('../wp-blog-header.php'); if ( is_user_logged_in() ) { echo 'Welcome, registered ...
0
votes
1answer
13 views

Removing get_template_part in child theme

Parent Theme loads some template files in its functions.php as follows: get_template_part ('lib/login/register.php'); I want to remove this file in child theme and include my custom php templates. ...
0
votes
0answers
14 views

Ordering by custom post meta key

I'm using the plugin WP Job Manager, and have a custom field with the meta_key "rating". I want to be able to order listings by rating, using "orderby". Normally for posts I imagine it would be ...
0
votes
0answers
10 views

Filter woocommerce products with product type

I added new product type like here http://wordpress.stackexchange.com/a/120220/66786 Now I want show just that type products here is the my query $query_args = array('post_type' => 'product' ); ...
-2
votes
0answers
26 views

Wordpress's WooCommerce Plugin compatibility with PHP 5.3 [on hold]

We have a web server that has PHP 5.3 installed and as per our clients requirement we need to use WooCommerce on the wordpress website . In the woocommerce 2.3.7 plugin page on wordpress site, its ...
0
votes
1answer
48 views

Counter the number of the product in order (PHP) [on hold]

I am having a problem with a plugin... $total_items_of_order = count($order->get_items()); With this variable I am selecting al the products in an order. But I want that I every product gets a ...
0
votes
0answers
23 views

site_url() returns with additional backslashes

I am using site_url() function and it returns the address as http:\/\/vip.local\/cc where I can see that WP automatically adds unnecessary backslashes. Is this for some escaping purpose? I tried using ...
0
votes
1answer
22 views

Can not manually create a database ( db, user, pass ) for a plugin

So I was working on a plugin and I needed to cache some third party API access, and I needed to manually create a database upon plugin activation or upgrade. The caching stuff needs a database host ( ...
0
votes
0answers
59 views

Limit the number of successful logins

I would like to retrieve the number of successful logins of a user and act accordingly. If user logged in more than 10 times, then log out user automatically with wp_logout() or similar. I would ...
1
vote
1answer
24 views

How to build an API as a plugin

I want to create a REST API endpoint for a wordpress site where I can get a JSON response for different queries. I have tried the tutorial here, but I cant seem to figure out how it works. Do I need ...
0
votes
0answers
10 views

Genesis custom post type pagination with custom taxonomy query loop

I am trying to create Genesis pagination for a page housing all posts from a particular taxonomy. I would use the many solutions given in this WordPress Stack Exchange but I can't figure out how to ...
0
votes
1answer
20 views

How to trigger WooCommerce order complete email?

I want to be able to trigger the WooCommerce order complete email at a different stage in the WooCommerce checkout process. So I've disabled WooCommerce order complete email from the backend and am ...
0
votes
2answers
43 views

Inserting dynamic content into a page

I see this subject comes up regularly but have not seen an answer to my specific requirement yet. I'm trying to use a WordPress page as a template and insert database-sourced content (about 20 or so ...
0
votes
1answer
15 views

add custom tags for custom post type in wordpress

I have many custom post type and I want two of them to be relate by tags. These tags are only useable to these two custom post type only. like I have two custom post type 1. books 2. writer and I ...
0
votes
0answers
10 views

Gravity forms plugins image upload code [closed]

I want to change dpi of an uploaded image before uploading that image and before saving into database.
0
votes
1answer
16 views

Trying to run website a php file is blank

I have a local copy of a website I am working on and I just found that the index.php files are almost empty. They contain only an opening php tag followed by a commend that says: "Silience is golden." ...
4
votes
2answers
253 views

Why do you need to wrap a function inside array($this, function)

I'm a newbie at PHP and wordpress so please be gentle! I'm building a plugin - following a few tutorials, getting it all working. My question is why is the function I want to call wrapped up in the ...
0
votes
1answer
22 views

Advanced Custom Fields not displaying

my php skills are pretty limited and I am pretty much stuck with the following issue. Why is my Custom Field (placed at the bottom) not showing up after the posts blocks? Here is what my code looks ...
0
votes
1answer
49 views

Get all taxonomies for all post types

I would like to get all the available taxonomy for each (custom) post type. My aim is to list for each post type, each taxonomy like category, tag and for each of these taxonomy to get all register ...
0
votes
1answer
12 views

get_term_link() returns correct - But illogical error-messages disturb

I've a really strange issue with Wordpress and the get_the_link()-function and a following issue with objects who are objects, but identified as non-object-error, itself they are working. First the ...
1
vote
1answer
24 views

Get posts with at least one category in common with current post?

In single.php : I want to get all posts with at least one category in common with the current post. I tried reading through the wordpress codex documentation but I found it rather confusing (I'm ...
-2
votes
0answers
9 views

Add some text after a specific post

I have a blog where 20 posts are appearing. I am using twenty fifteen theme. I want to add some text after 4th number post and then 8th, 12th and 16th.
0
votes
1answer
31 views

Ajax button not working

So i'm trying to make a follow button in wp, and for some reason the ajax button isn't working right. Here are the steps of what's supposed to happen user clicks #followbtn Ajax goes to $_POST ...
0
votes
1answer
18 views

How to refresh a template page on Wordpress in 3 seconds - easiest method?

Basically, on my site I have content submitted via a search bar. I'm using a content-none template to detect if the user is signed in - and if so it submits a post programmatically (if the post ...
0
votes
1answer
19 views

How to call a certain object/menubar in a PHP file

I made a template and had some help with adding a CSS file to the template. Now I'm stuck on the question, how do I add a certain menubar to my header. Example: topbar - has menu with "Welcome ...
0
votes
2answers
35 views

How to add new CSS file to new PHP file

I've made a new template file for Wordpress constructing the elements of the page via PHP and Wordpress recognizes the template as such. Then I wanted to include a CSS file for said template (same ...
0
votes
1answer
46 views

How can I pass a variable to wp_ajax action?

I'm writing a plugin that pulls data from an external API and inserts it into a bbPress topic. Here's some sample code: function bbp_ajax() { $topic_id = bbp_get_topic_id(); $the_issue_key = ...
0
votes
1answer
20 views

Are widget arguments always set inside My_Widget::widget()?

Specifically, are the before_widget, after_widget, before_title and before_title array keys always set inside My_Widget::widget()? I'm wondering if statements such as the following are necessary ...
0
votes
0answers
19 views

Passing string from a form to another page [migrated]

I have tried several plugins to try and pass a text field to another page via PHP and a HTML form. The form works and displays what was entered if there are no text input boxes in the form. The end ...
0
votes
1answer
33 views

List users by meta_key and meta_value

The following function will display a list of users based on their meta data: <?php function get_users_by_meta_data( $meta_key, $meta_value ) { $user_query = new WP_User_Query( array( ...
0
votes
0answers
26 views

Headers Already Sent

I know this is a favorite error! I understand the principles but I can't see why this code would create this error. page.php includes a get_template_part. I have a test page that renders and does a ...
0
votes
0answers
23 views

Getting most popular posts based on Facebook comments count

I have modified a widget to display the total number of Facebook comments on a post rather than the total wordpress comments. I can get that part to show correctly, but I would like to get the most ...
-1
votes
0answers
27 views

How to debug PHP in WordPress Themes?

PHP Code Sniffers and Debuggers such as phpdbg and xdebug are widely used in web app development. What kind of software/workflow do you use for theme development? How you inspect the value of ...