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

learn more… | top users | synonyms (1)

-1
votes
0answers
18 views

Why is it saving multiple rows at once just after login?

I want to save user login time. When I logins it save multiple rows in the table user_logins. Here is the code from my plugin: function ai_save_user_login_test() { global $wpdb,$table_prefix, ...
1
vote
1answer
24 views

Page vs Custom Post Types Differences/Issues

I started noticing issues last week when 4.5 was released and mistakenly believed that update caused an issue. In reality, I just happened to notice it for the first time around then because last week ...
0
votes
1answer
25 views

Calling a save function from a “submit” button

I am trying to call a function to save changes from a submit button, but I am not accustomed to PHP programming, as I have just started. I tried Googling around a bit, but didn't find anything too ...
-3
votes
0answers
41 views

Changing Pagination Numbering in Genesis Framework [closed]

Due to some requirements in the content I publish on my website, I need to change the pagination numbering from 1 2 3 4 to 0 1 2 3. I need to find a way to decrease the ID of the paginations to ...
0
votes
0answers
37 views

wordpress custom numeric pagination next / previous / last not showing

I'm using a custom Numeric WordPress Pagination on a page template using a wp-query, based on this tutorial : tutorial I have the numeric pagination working fine, and the page counter also. but the ...
0
votes
2answers
33 views

Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?

This is my first go at making my own shortcode. What I am trying to do I have 11 different outputs for star ratings I want to be able to use in posts. I want to wrap it all into one shortcode, and ...
0
votes
0answers
14 views

Output Video Download Link in template

I have a website that uses a "video" custom post type to display self hosted videos in post. I am trying to figure out how to make a download link for each video that uses this "video" custom post ...
0
votes
1answer
19 views

Setting value of session with Ajax not working

I´m kind of new to using Ajax but I am trying to update the value of a session using Ajax. The Ajax call shoud fires when clicked on a button. When I click on this button it also returns the succes ...
0
votes
0answers
16 views

Adding extra rows to form, and saving values entered.

I am attempting to create a quote-form where the user can add as many items as necessary. I would then like to take the values entered and output them to a html table in an email. Here is the ...
3
votes
1answer
78 views

How to get the registered sidebar's name by its id?

Let's say I have this code in my "functions.php": function mytheme_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar Name', 'mytheme' ), 'id' ...
0
votes
0answers
11 views

Click to expand menu

I have the following menu in Wordpress: https://jsfiddle.net/L3y2rno8/ (renderd HTML) The menu is using a custom walker in my theme functions.php: function wp_nav_menu_attributes_filter($var) { ...
0
votes
0answers
13 views

Show page title in links sitewide using a value from a meta field for AB Testing

I am building an AB Testing plugin. I have built a repeatable set of meta fields where each set of fileds will represent a new AB Test Variation. The main content of a variation consists of a title ...
-1
votes
2answers
33 views

foreach all the post

How to i foreach the post title like below. this is what i want below function get_all_post_for_search() { return array ( array( 'name' => "Hello Project", 'thumb' => ...
1
vote
1answer
17 views

Executing `createimagefrompng()` from save_post hook (or equivalent hook)

I'm having trouble executing createimagefrompng() from a hook. I've used the fairly straightforward PHP way to add a watermark to an image. If I hardcode the image URLs in this function and for ...
-1
votes
0answers
19 views

Table of content in sidebar of Paginated posts

I am trying to work out a way to display an automatic table of content for paginated posts. I want to display it in a side bar widget and make the widget sticky to go down when the visitor scroll ...
0
votes
2answers
31 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
29 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
31 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
27 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
32 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
25 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
1answer
23 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
12 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
31 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
43 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
36 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
38 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
30 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
26 views

Adding Taxonomy Image to taxonomy loop

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
56 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
31 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
10 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
33 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
41 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
25 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
20 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
61 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
18 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 ...
-1
votes
0answers
13 views

Making a multi-language website using Wordpress engine [duplicate]

This is the first time I have to do it with Wordpress and I got a bit stuck. Even if I abstract away from realization, I still have to deal with the next problem. All pages of the website should have ...
0
votes
1answer
52 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
47 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
32 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
49 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
35 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
39 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
61 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 ...