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

learn more… | top users | synonyms (1)

0
votes
2answers
35 views

Is it save to use eval for a jQuery callback method coming from the database?

I'll be brief and hope I can explain my scenario correctly. Here's my scenario. The jQuery slider plugin has an anonymous callback method. I would like to give the Admin the ability to create a ...
0
votes
1answer
45 views

Warning: call_user_func() expects parameter 1 to be a valid callback, function

I keep getting this error when. I am trying to insert a dashboard widget and I don't know what's causing the error. Warning: call_user_func() expects parameter 1 to be a valid callback, function ...
0
votes
1answer
35 views

jQuery accordion menu

So I have just started developing a theme with _s (underscores) as a basis. For three days straight (almost) I have been trying to make an accordion menu sort of like this: Example: ...
1
vote
1answer
31 views

Undefined offset: 0

Here is my PHP function function getUserIDandPush($ul){ global $table_prefix; // Prefix for Database table global $user_login; global $wpdb; // Wordpress WPDB database method $dt = ...
0
votes
1answer
35 views

echo esc_url( get_permalink($post->ID) + complete the ID's url

I am in a deep trouble I try to only display the content of a post after clicking a bouton in order to not have the header and the footer again. Manually I have downloaded the plugin "Show Content ...
0
votes
0answers
32 views

Display category name only once inside loop

I have been researching on how I can output the category name on a wordpress loop for custom post only to display only once. If there are any posts under the same category, the category name will not ...
3
votes
2answers
37 views

wp_insert_user role not working

I have be trying this all day but it is not working how do I set a role for the current user I am inserting with the wp_insert_user() function $userdata = array( 'user_login' => $username, ...
0
votes
0answers
15 views

List all post from different post type on one page by CPT UI

I am a php begginer. I am using CPT UI plugin for one of my projects - free resources for designers. The idea is to have different pages for different type of resources. So I will create different ...
0
votes
3answers
37 views

Division by zero error in image.php

Checking my error log on the server I continually see the error: PHP Warning: Division by zero in /public_html/wp-content/themes/sass-wordpress-bootstrap-master/image.php on line 95 Here is the ...
0
votes
2answers
48 views

Show custom taxonomy not in submenu

I have one small problem and I can't find answer...I have created custom post type and custom taxonomy, but my custom taxonomy is showing as sub menu under custom pos type, here is example what I ...
0
votes
1answer
16 views

Wordpress PHP syntax doesn't seem to be working correctly

When I run this wordpress query, instead of the background image showing I just get the end of the div string echoed out? The image string appears in the browser inspector, but not to the screen. Here ...
0
votes
2answers
42 views

Relative post date in recent posts list

I have basically worked on this all night and I realize I am quite stuck. I have a sidebar in my wordpress theme that displays the most recent posts. The sidebar looks like this: Below each title ...
-2
votes
1answer
22 views

wordpress theme breaks in inserting an external php ? possible mistake in folder config?

I am new to wordpress and following is my scenario. I am inserting an external php script in wordpress by creating a new template in the theme and then using that template in a new page. When I do ...
-2
votes
1answer
44 views

True or False: Is an Apache error or PHP error the same as a WordPress error?

I am using CentOS 6; Apache 2.2.2; MySQL 5.6; PHP 5.5.31; WordPress 3.8.13 . I do not have root access to this server because it is shared. I do have FTP and SSH (with some limits to functionality). ...
0
votes
1answer
23 views

Is it possible to retrieve all posts with a certain value for metadata?

Under 4.5, I have posts with meta_key as series and meta_value as 19, 20, etc I am trying to loop through them in a template, and I guess I'm a special kind of dense. Most recently I have tried ...
0
votes
1answer
31 views

Form not working as it should in WordPress, but in a normal HTML site it does

I am in need of help. I have a website, which has a form to fill out (simple form, that calls a PHP function and some other JQuery libraries). It is made in an ordinary HTML file, and works well on ...
1
vote
1answer
27 views

Adding Taxonomy Image to taxonomy loop [closed]

I'm using the code below to show six random tags, adding a class on an <a> tag. $args = array( 'taxonomy' => 'post_tag', 'hide_empty' => 0 ); $tags = get_terms( $args ); $class_name = ...
0
votes
1answer
82 views

Wordpress File handle - fopen, fwrite not working with $.ajax or $.post Jquery

I am making some log for all the action done in the site that can be store in a .txt file. my php code in working fine when doing a normal load, but when i use ajax it seems like i doesn't read the ...
0
votes
1answer
32 views

Restrict characters in comment section

I am using Travelify theme and I am having some trouble restricting the characters in the comment section (textarea) or where the name or mail goes into the input tags. I read some articles about ...
0
votes
1answer
12 views

Create a hierarchical taxonomy list in Wordpress

First of all I want to thank all of your for reading my post and trying to answer my question. I'm having an issue regarding the taxonomies of Wordpress. I created a website with a custom taxonomy ...
0
votes
1answer
67 views

Woocommerce change shipping method by hook

What I would like to do is to have a condition to pick which shipping method is used. For orders with total cost < 100 the shipping method should be 'regular' and for orders with total cost > 100 ...
0
votes
0answers
52 views

Woocommerce Product Add-ons - Auto-select first option

The agency I work for are trying to get a client's website to auto-select the first option on the maintenance packages for their products. Currently, we are using an if statement within a foreach. ...
0
votes
1answer
27 views

Foreach implode issue

I have this piece of code that gets the values of meta boxes in WordPress. $guiones = rwmb_meta( 'mb_guionistas', array( 'multiple' => true) ); $pieces = array(); foreach ($guiones as $item) { ...
0
votes
1answer
22 views

How to change text in a page by utilizing a custom user id?

I am looking for a way to change select text within the homepage on a particular site, utilizing a custom user id. I would like to be able to have multiple user id's for the same website without ...
0
votes
1answer
148 views

PHP code on Visual Composer Plugin

I want to add some php and html code in my page but i can't do it using Visual Composer, i can choose the "Raw Html" Box but that doesn't render PHP at all, only HTML. Do you guys have any idea how ...
0
votes
0answers
22 views

How do link to the most recent post in a category (Cornerstone theme)?

Hello friends :) I am in a pickle. I am creating a website in X/Cornerstone for an artist who has many projects , each has of which has its own Wordpress site. All of them rely on blog posts to ...
0
votes
1answer
43 views

Why isn't my custom Javascript showing up in my custom template?

I'm in the process of converting an HTML homepage to WordPress format and I'm not sure what to do with the Javascript that's included within the of the index.html homepage (as opposed to the JS ...
0
votes
1answer
67 views

Required PHP version: 5.3.3 - Version found: 5.2.17… How or where do upgrade to 5.33 [closed]

HI I am getting this error message when trying to activate simple google cal...Required PHP version: 5.3.3 - Version found: 5.2.17... How or where do I go in wordpress to upgrade to PHP version ...
1
vote
1answer
48 views

I can't get my custom widget area to show on my Wordpress site

I can't get my sidebar to appear on my site. I add a widget section since there wasn't any: function.php <?php if (function_exists('register_sidebar')) // Area 1 register_sidebar( array ( ...
0
votes
0answers
36 views

How to use get_stylesheet_directory_uri() in an array?

I create an social icon placeholder on the WordPress theme. I am using this code: "url" => get_stylesheet_directory_uri() . "/images/rss.png" to placed a default icon. I's work on old WP ...
3
votes
1answer
50 views

Bypass .htaccess when using download_url

I've got the following .htaccess file in my a custom directory in Uploads called client. RewriteEngine On RewriteCond %{HTTP_REFERER} !(www.)?example.co.uk/client-area* RewriteRule ^.*$ - [R=403,L] ...
1
vote
1answer
49 views

WooCommerce Custom Product to checkout

I was trying to create a custom shop page for a project where users can click on a product to view the details in a modal window and select some options on price variations. What I want to do is to ...
0
votes
2answers
41 views

Correct and safe way to include php content in my page

I have a website where I use [insert_php] to insert php content to my page. What I do is simply use php's include inside insert_php to include my complex php script. I asked a question a while ago, ...
1
vote
1answer
90 views

AJAX success response is not working but it's saving my changes

I'm a beginner in jQuery-Ajax so please bear with me. My Ajax response does not seem to load but my changes are being saved. but gives me this error on admin-ajax.php "call_user_func() expects ...
0
votes
1answer
51 views

How Do I Add User Custom Field to REST API Response?

I am writing a WordPress theme that adds several custom fields to the user profile using the following function function add_contact_methods( $profile_fields ) { // Add Social Media Fields ...
0
votes
0answers
37 views

How to use pre_get_posts filter from frontend user input (GET variables) or do_action

I'm trying to allow users to filter certain pages based on the input from a dropdown. <div class="filter-by-calories"> <h3 class="filed-title">BROWSE BY CALORIES</h3> ...
0
votes
0answers
43 views

Wordpress Multisite trouble changing Apache port

I have tried many options and my localhost multisite stll doesn't work.I'm using wamp and I have two wp local sites. These are my folders: wamp/www/WP/Funanarchy first site: wp. second one: ...
0
votes
0answers
30 views

How to replace index

Hello everybody im trying to make plugin like WPTouch but different and i've got a question. How to replace content of homepage and single pages without header location i want to replace it on the ...
0
votes
1answer
27 views

How to edit the styles for the table of pages/post listed in the admin when you click on pages/posts?

It seems that some of the css on the table that shows the list of all the pages adversely reacts with one of my plugins, which adds a bunch of columns to the table. I'm pretty sure this is edit.php. ...
0
votes
1answer
25 views

Error display post thumbnails for previous and next post

I managed to display the thumbnails for the previous and next post on my custom post type but I keep getting this error "Notice: Trying to get property of non-object in ...
0
votes
0answers
26 views

Display a portion/ branch of the menu

This in nice Wordpress menu filter from @Rarst for showing partial menu but this won't work deeper than level 2 menu. http://wordpress.stackexchange.com/a/2809/92020 I am not familiar with Wordpress ...
-2
votes
2answers
43 views

How to create a loop where loop changes every post?

How can I create a type of loop in WordPress where an image moves left or right for each post? I.e. first post image will be left, second post image will go right, third post image will go left, and ...
0
votes
1answer
21 views

Where is the php file of single member profile view (BuddyPress)

The edit.php file is for single member edit profile page. And I'm looking for the page that handle single member profile view. So the I can modify the display of user's profile view. Is there ...
0
votes
2answers
30 views

Childs PHP files not overwriting Parent's PHP files

I have a php file located at: .../wp-content/themes/kallyas-child/pagebuilder/elements/TH_TeamBox/TH_TeamBox.php I'm trying to use the above file to overwrite the parent's TH_TeamBox.php file which ...
0
votes
1answer
49 views

global $post inside plugin query messes up every new post page in wp-admin

I have a very strange problem that I am trying to troubleshoot: I have a query (to build an array) that I run on a custom post type inside my plugin. It looks like this: function makePointerQuery(){ ...
0
votes
1answer
28 views

'pre_user_query' interfering with user export

I needed to add sortable columns to clients wordpress for custom meta data I created so I used a pre_user_query hook add_action('pre_user_query', 'user_column_orderby'); function ...
0
votes
0answers
15 views

How to load comments based on URL parameter(s), not post ID?

I've modified my wordpress install to grab data from an external db instead of relying on the post system. The problem is, the same comments are loaded regardless of the URL - of course this is to be ...
0
votes
0answers
38 views

Create a custom taxonomy archive to pull categories that have two matching taxonomies

I'm trying to create an archive page for a custom post type that will pull in taxonomy categories that match two per-determaned taxonomies. I do not need to display the products on this archive page. ...
0
votes
1answer
26 views

Validate Custom Post Type fields

I'm developing a plugin, in which the administrator has the ability to add and remove ZIP codes on the backend. I found that the best way to do this is by creating a custom post type named zip_code ...
-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 ...