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

learn more… | top users | synonyms (1)

0
votes
0answers
38 views

Use This Code in Frontend

I am using this code, adapted to my needs: <?php /** * Plugin Name: YLDist Profile Checkboxes * Plugin URI: * Description: Profiles * Author: JPowersFreelancing * Author URI: * Version: 1.0 ...
1
vote
1answer
38 views

WSoD being caused by this piece of code

This is a function I'm writing which is supposed to post an input along with some other information, to a database. As of right now, activating the plugin produces a WSoD, when the function is removed ...
0
votes
1answer
37 views

How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?

Good day! I try to make display post counter for WordPress. Output count of views function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); ...
0
votes
2answers
43 views

Adding php directly into widget shortcode

So here is my button shortcode in my widget. [button title="EDIT" href="<?php ech edit_product_url( $post->ID ); ?>"] As you can guess the href url does not work. What would be the best ...
0
votes
0answers
16 views

Empty result when trying to fetc post in the future

I am trying to fetch a single post that is either scheduled or published using a custom WP Query. The query is running asynchronously. However I get no results. Here is my code: ... $args = array( ...
0
votes
0answers
35 views

How to change html generated by wordpress media uploader

I have managed to change the output of wordpress media uploader using image_send_to_editor exampled below (where the output is image:($url)) However I want to do the same with other files like ...
0
votes
0answers
50 views

How to add pagination into post showing

I have created a plugin to display all posts on any page by short code. But how do I add pagination? global $wpdb; query_posts('cat='.$cat); $table_name = $wpdb->prefix . "advertisement"; ...
0
votes
0answers
56 views

Auto remove empty values in array

I have a custom meta box that let's users add new fields. If the fields are saved the values are stored in an array. If a user wants to delete a certain value he empties the field and saves the page ...
0
votes
0answers
22 views

Why is the_permalink only echoing the base category?

0 down vote favorite I am running the following code on Wordpress: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><?php the_permalink() ?>,<?php the_ID() ...
0
votes
1answer
92 views

Add a wp editor to custom plugin and save data

I'm creating a custom plugin. One of the fields in the plugin let's the user add data. If I add a textarea the user has no control over the text. So I would like to add a editor. I know WordPress ...
0
votes
0answers
37 views

Creating a text file in plugin directory not working

I am creating a plugin that in admin end will create a text.file but when I tried it, no text file were created. this is my code.. if($_POST['pluginvalue_hidden'] == 'Y') { ...
0
votes
1answer
20 views

How to Generate a list of Most Commented post?

I'm trying to call a list of most commented post. But the call to the DB returns always the same post (the first one in the loop) This is my code in functions.php function ...
0
votes
1answer
57 views

Would it be possible to route Wordpress Through an MVC Application

I have a slim framework application in the root directory /. I have a wordpress install in the '/blog/' child directory. This is all fine and well as i can easily access the /blog/ folder and any ...
0
votes
1answer
258 views

Jquery ajax to custom php file: returning blank data

I created a custom php file, put it in my folder. The files does insert some data to the database to a custom table i created. require wp_path() . "/wp-load.php"; global $wpdb; $favorite_table = ...
0
votes
1answer
71 views

Using wp_send_json to return HTML

I don't understand how to return HTML correctly via AJAX. I have this routine function DisplayEventInfoBox() { ?> <div id="eventInfo"> <div class="avail-from cart-right"> ...
0
votes
1answer
25 views

unable to set uploaded file via frontend form as featured image

i have a form that allows input of name ,email & photo...when i click on submit i want it to insert a row into the posttype called'contact' with the info submitted by the form and the image as the ...
0
votes
1answer
25 views

Result from wp_send_json adds line feed

I've got a local Windows stack running AMPPS at 5.4.35 and my code runs fine but when I deploy to my Bluehost server running PHP 5.4.28 the execution of wp_send_json is different. wp_send_json( ...
0
votes
0answers
21 views

PHP Wordpress Monthly Top Author in Sidebar

Im trying to show List of Top Author by Property Update Count (Monthly) in my sidebar. How to adjust this php code. This php only show AUTHOR list in my sidebar, not sort it by Monthly Property Update ...
0
votes
1answer
66 views

custom plugin with upload files does not work

I an creating a custom plugin that used shortcodes.. then it will have a feature that will upload files and stores it in wp-content/uploads/ directory.. but it seems I got an error.. Warning: ...
0
votes
2answers
78 views

How to run ajax in Wordpress Post?

I am trying to use ajax in wordpress I have two comboboxes in single-meetings.php the second combobox values are based on selection from the first one here is my single-meetings.php <form ...
0
votes
1answer
11 views

Rewriting to a different page based on existence of query string?

I have a home page (id = 4) and a form page (id = 5). I want to send them back to the home page if they don't have a query string. But if they do have the query string we are looking for, then I want ...
0
votes
1answer
34 views

Updating From Mobile App - Exposing Site to Hacking

I have made a simple Mobile App to update a wordpress site. It starts with a login (to the app) and then with forms, sends data via POST method to a PHP file that then uses wp_insert_post, ...
0
votes
0answers
23 views

keep parent slug active in menu when child menu is hidden

i want to know how to keep a menu active when child menu parent_slug is null and i don't want show that menu to user because its my edit menu add_menu_page('Manage', 'Manage', 'administrator', ...
-1
votes
1answer
254 views

My wordpress website admin panel loads very slow, what can i do about that? [closed]

I am having a very slow load time for long time now, I read absolutely everything that I could about how to speed up my WordPress website hosted on azure, However there things that I am not capable to ...
0
votes
0answers
30 views

Limit Taxonomy Parents

I've got a custom taxonomy set up as hierarchical, with a custom function to limit the number of categories the user can select to one. I also need to limit the depth that this custom taxonomy can ...
0
votes
1answer
48 views

wordpress add_action() issue in ajax call

After a hole day finding solution for the issue, i didn't get what is exactly i am making the mistake. Please give your valuable answer for my issue and humble request not to block if you can't ...
0
votes
0answers
9 views

How to handle loading all Post records and allowing user to select which ones they want inserted into newsletter?

For a while now I have wanted to build a new WP PLugin that allows you to selects Posts and generate a MailChimp Newsletter. It let's you use a template and select all the posts you want in the ...
0
votes
0answers
45 views

Form in page template not working or updating

I have a gallery of images with a button for each image. When a button for an image is clicked I want the custom field, called count, be updated with the newcount... but the form method is not ...
-1
votes
1answer
27 views

how can I make content from a plugin hidden when user is logged in? [duplicate]

I would like to make my social icons at the top of my page disappear when a user logs in to my website... what is the best way to go about this and can you give me all options that are possible ...
0
votes
1answer
37 views

Class property seems to lose scope, attached to save_post action?

This may be more suited for StackExchange, so if you think that would be the right place to direct my question - please let me know :). So, I have a class with a property of save_list. This is an 2D ...
0
votes
1answer
38 views

main menu page redirects to user ID

I have a site that displays fitness results to clients. It works by showing them a page based on their UID displaying unique charts and graphs etc. I can redirect members to the unique pages on ...
0
votes
1answer
30 views

Non-array argument in array_merge()-function [closed]

I'm building a small plugin, basically with a settings page that holds four text fields and two checkboxes. Everything works fine, including the checkboxes - as long as one or both of them are ticked ...
0
votes
0answers
26 views

Categories in the wrong order php

I have this code of php and it pulls categories in the wrong order <?php $args = array( 'hide_empty' => false, ...
-1
votes
1answer
35 views

How can I make content disappear when a user logs in?

I am working in Wordpress, and I would like to make certain elements disappear once a user logs in. How can I do this? I have social icons on my page that I positioned to the center of my menu bar at ...
0
votes
0answers
26 views

Wordpress supercache real time preload

When a user create a new post, WP automatically share this URL in Twitter. This cause Twitterbots and other crawlers make many http request. All this process occur in 3 seconds where WP receive 6 to ...
2
votes
1answer
96 views

How to make a variable available for the duration of the page request

I'm trying to limit the number of database reads per page request. Currently, each time the get_avatar hook fires, I make a call to get_option() which returns some data. The $data returned doesn't ...
1
vote
2answers
51 views

I don't understand how this parameter works..?

Ok, I've got this simple code for a simple plugin which prepends post titles with the word TESTING.. I'm really unclear how the parameter works here. I understand how parameters work in PHP, but ...
0
votes
0answers
21 views

Gabfire Widget Image Too Small

I have an issue with an updated widget on Wordpress. I have a sidebar Widget using Gabfire's Widget Pack which is running version: 1.4.4, Wordpress: 4.1.1 and Theme Patterns which is also up to date. ...
0
votes
1answer
24 views

Adding a “Word” in php code

So, I know title is super confusing but I didn't know how to word it. In the following code, the word "View:" is placed and displayed properly on the page. <div ...
0
votes
2answers
82 views

Applying CSS on PHP variable [closed]

I have PHP code as $message = str_replace("{eventlinkURL}",$eventlinkURL,$message); I want to set color to the $eventlinkURL variable. I tried using <font> echo "<font ...
0
votes
0answers
55 views

Custom Theme's “Preview Changes” Doesn't Work for Previously Published Posts

After I've published a post and try to edit it again, clicking the "Preview Changes" button shows the version that was previously saved, not what I've written new in the editor. When a post is a ...
0
votes
0answers
20 views

Custom Fields: Linking a thumbnail to another image

I'm trying to figure a way to link a project, not to another page, but rather to an image that I'll eventually display in a lightbox but for now, it just links to the image in its' own window. That's ...
2
votes
2answers
39 views

Filtering the default avatar list

I'm using the avatar_defaults filter hook to filter the default avatar list. For example: function my_avatar_defaults( $avatar_defaults ) { $avatar_defaults['http://example.com/foo.png'] = __( ...
0
votes
1answer
51 views

Wordpress upload images not displaying

Hello I have a wordpress site and I upload images to media library but the images do not display. In wp-content/upload folder there are other folders like 2015/ and then in that folder there are ...
0
votes
0answers
35 views

Improve my timetable's code

I'm working on a wordpress theme and creating a time table who will be easy to complete by users. In the back-office, there are a checkbox for each days : <input id="checkbox1" ...
0
votes
1answer
70 views

How do I remove spammy links in WP theme footer?

I got a little obstruction. I have a free theme, which I like, but I found out that in the footer there are too many commercial links (Let me say spammy links). I want to keep the credits to the ...
0
votes
0answers
78 views

How to get Woocommerce order product info

I am trying to get all woocommerce orders and find info about the products in each order. I have seen many examples on here and elsewhere on the web and they all seem to say to do the same thing but ...
0
votes
0answers
24 views

XML feed failing to generate because it can't find a plugin

I'm supposed to be generated a feed through http://www.edifecs.com/e/feed/ to be then used through things like feedburner. But it encounters this error: This page contains the following errors: ...
0
votes
0answers
22 views

meta_query argument not working

I am trying to use WP_Query to search through posts BUT I want to also search by post_title as well, which is why I tried using meta_query in my arguments array. I want to actually do more than just ...
0
votes
1answer
59 views

Add specific content after specific text in every post

Suppose I want to add some imagess in my all posts Eg. I want add this : <img src="ad.png" > after this text That's all every post & that image should be different in different ...