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

learn more… | top users | synonyms (1)

0
votes
0answers
7 views

Bootstrap navbar-static-bottom, full width in wordpress?

I am using bootstrap nav-menu as footer, but aparently theirs no navbar-static-botton. I want my navbar on the bottom but full width. Here's my footer.php code; <footer> <body <?php ...
0
votes
0answers
20 views

t2.micro / RHEL / NGINX / PHP-FPM

I have my site www.futbolcolombiano.com.co, it has RedHat 7, Nginx 1.8.0, PHP-FPM 5.6.20 and run with wordpress, i have default configuration but sometimes run well and other times shows 502 Bad ...
0
votes
1answer
425 views

setcookies and header send

I put simple php condition in the header.php of template as this : setcookie("test_time_".$cookie_id."", $cookies_times, time()+3600); The result always as this headers already sent , i use this ...
0
votes
0answers
9 views

User defined password in new user approve plugin

I am using new user approve plugin and I'm satisfied. It works, for web site and Rest API, but the problem is when I want to use my own password style (only numeric and 10 digits). I added some ...
-1
votes
0answers
14 views

Generate thumbnail for image without Wordpress

I don't want to use Wordpress built in media uploader . I have a php script in my site that grep the posts from some place and put it in my wordpress site with a photo and make this photo as ...
4
votes
1answer
38 views

Check if user already visited this post today

I have a piece of code which measures a post popularity. How would I go about checking if user didn't already visited this post for past 24 hours? Do I need to set a cookie for user and for each post ...
0
votes
0answers
22 views

Need help running php on page

I need help running my PHP code on a WordPress page. I’m using a plugin to run my PHP code. This is a code I'm trying to run: <?php define('STEAM_CONDENSER_PATH', dirname(__FILE__) . ...
1
vote
1answer
33 views

How create a Shortcode with hover and complex options

I am wondering how do you do when you have to create a shortcode with multiple hover or complex options ( gradient, boxshadow etc, thing that can't be inline ). How do you generate the css. I don't ...
0
votes
1answer
29 views

How to change thumbnail src attribute?

I am working on a plugin that can generate a thumbnail from a URL, getting the first image from posts; it is similar to an auto thumbnail generator. I get all img tags, but the URL is changed. Here is ...
2
votes
1answer
28 views

Remove username in emails or swap username for email

Is there anyway I can remove all instances of the username in all WP emails, or swap our the username for the email address? I have some code in my functions.php file that removes the username from ...
1
vote
1answer
22 views

Trying to establish connection to External Database

I'm trying to get a connection to a separate external database from the database the wordpress site depends on. I have a PHP file inside the same location of my theme, it is basically a blank PHP it ...
1
vote
1answer
25 views

How to show phpinfo() only in a new tab?

My problem is that I want to add a link to my plugin which should direct the admin user to a new blank page which shows phpinfo()? Can anyone direct me how to do this? I know WordFence has a feature ...
0
votes
0answers
19 views

Determine if a page has been saved yet and has an ID using PHP?

I have a metabox on the edit screen which will check a custom database table for existance of a record matching the current pages ID. If the record exist then I show all my data. If the record does ...
0
votes
1answer
19 views

Add custom field to attachments in a specific category

I have a working function that adds a meta field to all attachments (so I can enter the url of a video). I would like this field to populate only on attachments in the "video" category. I've tried ...
3
votes
4answers
13k views

Setting custom cookies in Wordpress

I am trying to set cookies to re-route returning users to my a specific page within my Wordpress site. I'd like some advice with these 2 things: Where in the Wordpress php files should cookies be ...
0
votes
2answers
912 views

Including all post id's of a custom post type into an array

For my single.php (products.php), I try to build a navigation via which the user can switch between products based on the meta key "price". I want to put all id's of the products post type into an ...
1
vote
2answers
520 views

PHP Script for last login time

I've got this script to update a table in my database with the logout time of a user, then when they log in next time, this data is shown in the form of "Last login: date time". However this isnt ...
-1
votes
0answers
15 views

how to update same column in loop mysql [on hold]

I have a value as an array of one column of mysql table ,so how do I use update query to update this value using PHP loop at once?
0
votes
3answers
58 views

Add URL parameter to all internal links using a specific theme

I got stuck with some modifications and maybe someone could give me some help. What am I doing I use the multiple theme plugin to switch themes for my WordPress project. To switch between the ...
2
votes
0answers
7 views

wp_handle_upload_prefilter valid date from input file

I want to ask some help, i'm having problem with thewp_handle_upload_prefilter Here is the code: add_filter('wp_handle_upload_prefilter','mdu_validate_image_size'); function mdu_validate_image_size( ...
0
votes
1answer
8 views

Load custom posts with same tag as page

I'm using this plugin to add tags for a page: http://wordpress.org/extend/plugins/post-tags-and-categories-for-pages/ And I've added tags support for the custom post: function codex_custom_init() { ...
0
votes
0answers
24 views

Issue with AJAX passing values from jQuery to PHP

I made an AJAX form in WordPress by making a plugin. The script runs well: First I retrieve the value from the form, then I send it into post_meta table, and finally I put the value in the div I want ...
0
votes
0answers
14 views

Wordpress using get_term to retreive slug not working as expected

Im using the below code to try and get the slug for the current category and the parent category. Ive managed to get as far as getting the currently cat slug but the parent displays in readable text ...
0
votes
1answer
438 views

How to avoid timeout waiting for output from CGI script?

I have Apache Error coming from /wp-cron.php. I didn't modify that file. How can I avoid the timeout?
1
vote
1answer
25 views

Help with a $wpdb MySQL Query

I'm wanting to expand on the following query to look at multiple meta_key and meta_value values that have been created with the Advanced Custom Fields (ACF) plugin. e.g. meta_key 'colours_%_colour' ...
3
votes
2answers
45 views

How do I output a database option that is an array into a get_posts array?

This must be fairly simple, but I'm puzzled. And I may be going about it backwards. How do I output a database option that is an array into a get_posts array? I have an option in the database that ...
0
votes
1answer
30 views

1+1 php counter inside the update_post_meta

how do you create a 1+1 php counter inside the update_post_meta? this is the code i have so far: $count = 1; update_post_meta($bid_id, 'draftnumber', $count++); but the counter is not moving, so i ...
1
vote
1answer
14 views

Different post styles depending on category

I am using Zephyr theme The link to the blog page. I want to style each post differently based on the post category ex: social media, announcements ect. I would like to style them using a cards ...
0
votes
1answer
29 views

Problem with AJAX in wordpress plugin

I'm writing a plugin and trying to get some data from the database and post it using AJAX. After sending the AJAX request, PHP processes the data and is trying to give me some page data, but it ...
1
vote
1answer
16 views

How to show 50×50 image thumbnail in Related Post

I am showing related post in my WordPress without any plugin, the issue is I want to show custom size of image in related post via CSS, how to do this? Here is my related post code . <?php ...
2
votes
1answer
2k views

How to get Poster (thumbnail) Image of Video

I'm getting all videos using the function below and it's working fine. Now I want to get the videos Poster Image (Thumbnail Image) from that video. How can I get the video Image as thumbnail? I've ...
0
votes
0answers
20 views

clicking the next pagination, the last post was also in page 2 error

I need some help or explanation regarding pagination in custom post type, I'm using a theme, so there is a pagination readyset there is one problem, if i set the custom post type post per page into 2 ...
0
votes
1answer
15 views

Splitting Repeater Fields in Advanced Custom Fields [on hold]

So, I need to be able to split four repeater fields into separate columns for a layout I'm working on and I can't find one that has been able to work properly, or suit my needs. Essentially, I need to ...
0
votes
1answer
20 views

show desktop version of website if button is submited

Hello i can't solve my problem. When users is on mobile device and click on "show mobile version" or something like that it will show him desktop version of web and if he click again switch back it ...
0
votes
0answers
32 views

How to set featured image from external url without downloading image [duplicate]

I want to set featured image of my post from external url and without downloading, I am using auto-post-thumbnail to generate featured image, but it save image to my server. Is there any method to do ...
-1
votes
0answers
10 views

Upcoming Events Only

I inherited this WordPress site and I've been asked to edit the Events page. I want to only show upcoming dates instead of all the dates. Here's the current code: <?php ...
0
votes
1answer
22 views

Using Custom Javascript and pHp to send email to myself when a user clicks on an input button but only works on Chrome, IE, and Micorosft Edge

So I am using jQuery and pHp together to send an email to myself whenever a user clicks on the update button of their Ultimate Member form. However, the email only sends when a user is using Chrome, ...
1
vote
2answers
65 views

WP_Query return highest number only

I have a custom post type with the fields Exercise and Tempo. Here is an example of how that might look: Exercise 1 - 100 Exercise 2 - 104 Exercise 3 - 96 Exercise 1 - 104 Exercise 2 - 110 Exercise 3 ...
0
votes
0answers
21 views

How to hide a post until its prerequisites are complete

I have two custom post types Exercises and Tempo Submissions. For each exercise, I have a field that contains an array of other exercises that are it's prerequisites. I also have an exercise field ...
2
votes
3answers
124 views

How can I limit the length of the previous/next posts in my Wordpress Theme?

I am using the following code to show next/previous posts in my wordpress theme. <?php previous_post_link('<span class="left">&larr; %link</span>'); next_post_link('<span ...
0
votes
1answer
17 views

Rewrite /keyword1+keyword2.html to search page | .htaccess

I am facing trouble redirecting the keywords to search page in a wordpress 4.4 setup. What I am trying achieve is to rewrite/redirect www.site.com/**search+keyword.html*** to ...
0
votes
1answer
27 views

How to solve 404 permalink errors on nginx server

I can't solve this issue. I tried everything I found over the web. I first tried configuring my nginx.conf following the example on codex with no success. https://codex.wordpress.org/Nginx I found ...
-5
votes
1answer
40 views

is it possible to create cart functionality without woocommerce? [on hold]

I was wondering about how I can create custom cart functionality without installing WooCommerce plugin. Is it possible?
0
votes
2answers
24 views

How to insert a local image with custom size

I am not very familiar with PHP yet but I am trying to build a Wordpress theme. In one of my theme files I simply want to insert an image (located at the theme directory /img/image.jpg) with a link ...
0
votes
1answer
2k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
1answer
551 views

wordpress admin part is not accesbile after server shifting

one of my site's wp-admin is not accesible but the site front part is loading. This happens after i accessed the site from my new server second time. at first nothing happens and i can logg into ...
1
vote
1answer
1k views

Specified file failed upload test. wp_upload_handle

So I managed to write a peice of code that allows me to upload a zip file, im not even sure where it gets uploaded too, and I am doing it on my localhost with apache in control (www-data). the code is ...
0
votes
0answers
37 views

Including wordpress core in php script impact on load speed

I'm using require('wp-load.php'); to be able to use wordpress's functions outside of wordpress. My question is, how much impact does this have on performance? Will it like double the load or ...
0
votes
1answer
25 views

$wpdb->delete column values IN ARRAY()?

I am wondering if this is possible? $wpdb->delete( 'table_name', array('id' => array(1, 2, 3)), array('%d') ); So, in this situation, it should remove 3 rows at once, and call the ...
0
votes
1answer
448 views

WordPress get pagination on wpdb get_results

How do I gee the numbered pagination of custom wpdb result? below code will show one latest post from each authors in the site. I want to show 20 posts per page with a numbered pagination. $postids ...