php

PHP is a widely used, high-level, dynamic, object-oriented and interpreted scripting language primarily designed for server-side web development.

59 votes
6 answers
2.3K views
How to create websockets server in PHP

I am looking for a simple code to create a WebSocket server. I found phpwebsockets but it is outdated now and

avatar
Gigi
0 1 0 9
asked 07 September, 2021
66 votes
5 answers
2.4K views
How to Use AJAX in a WordPress Shortcode?

I have a code to display a random quote. One person wrote a function to implement all of this. But the update

avatar
Majorie
0 1 0 9
asked 07 September, 2021
53 votes
9 answers
3.1K views
How to pass extra variables in URL with WordPress

I am having trouble trying to pass an extra variable in the url to my WordPress installation. For example /n

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
55 votes
11 answers
1.7K views
WordPress Get the Page ID outside the loop

I want to get the page ID before starting the loop in WordPress. I am using $page = get_query_var('page

avatar
Louetta
0 1 0 9
asked 07 September, 2021
56 votes
6 answers
2.6K views
How to include WordPress functions in custom .php file?

How can I include WordPress functions in a custom .php file? In detail: I have a directory under my theme (Co

avatar
Vi
0 1 0 9
asked 07 September, 2021
45 votes
11 answers
1.5K views
Get current category ID of the active page

Looking to pull the category ID of a specific page in WordPress that is listing all posts using that specific

avatar
Joseph
0 1 0 9
asked 07 September, 2021
51 votes
9 answers
808 views
Get custom product attributes in Woocommerce

In Woocommerce, I am trying to get product custom attribute values but I fail miserably and I don't get a

avatar
Shantay
0 1 0 9
asked 07 September, 2021
58 votes
4 answers
1.5K views
WordPress query single post by slug

For the moment when I want to show a single post without using a loop I use this: <?php $post_id = 54; $qu

avatar
Kisha
0 1 0 9
asked 07 September, 2021
54 votes
5 answers
1.6K views
How to get WooCommerce order details

In WooCommerce from the following line code: $order = new WC_Order( $order_id ); How can I get WooCommerce

avatar
Joseph
0 1 0 9
asked 07 September, 2021
56 votes
26 answers
1.7K views
What&apos;s the net::ERR_HTTP2_PROTOCOL_ERROR about?

I'm currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200 error on Google Ch

avatar
Boyd
0 1 0 9
asked 07 September, 2021
54 votes
8 answers
413 views
PHP - Merging two arrays into one array (also Remove Duplicates)

Hi I'm Trying to merge two arrays and also want to remove duplicate values from final Array. Here is my

avatar
Keila
0 1 0 9
asked 07 September, 2021
54 votes
9 answers
1.8K views
Turn off deprecated errors in PHP 5.3

My server is running PHP 5.3 and my WordPress install is spitting these errors out on me, causing my session_s

avatar
Brianne
0 1 0 9
asked 07 September, 2021
59 votes
8 answers
1.6K views
How to get the current taxonomy term ID (not the slug) in WordPress?

I've created a taxonomy.php page in my WordPress theme folder. I would like to get the current term id fo

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
60 votes
5 answers
432 views
Proper URL forming with a query string and an anchor hashtag

When both a query string and anchor tag (hash tag) are visible in a URL, what is the proper order for them to

avatar
Percy
0 1 0 9
asked 07 September, 2021
58 votes
11 answers
310 views
What type of hash does WordPress use?

What type of hash does WordPress use? Here is an example of a WordPress hash: $P$Bp.ZDNMM98mGNxCtHSkc1Dqd

avatar
Omar
0 1 0 9
asked 07 September, 2021
55 votes
20 answers
2.8K views
How to get WordPress post featured image URL

I am using this function to get the featured images: <a href="#" rel="prettyPhoto"> <?php the_po

avatar
Dusty
0 1 0 9
asked 07 September, 2021
61 votes
27 answers
3.1K views
Nginx serves .php files as downloads, instead of executing them

I am installing a website in a droplet (Digital Ocean). I have a issue for install NGINX with PHP properly. I

avatar
Corrin
0 1 0 9
asked 07 September, 2021
65 votes
23 answers
638 views
PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

I am getting this error when trying to upload an import on WordPress on my XAMPP local dev environment: Warni

avatar
Xavier
0 1 0 9
asked 07 September, 2021
63 votes
17 answers
1K views
How can I add a PHP page to WordPress?

I want to create a custom page for my WordPress blog that will execute my PHP code in it, whilst remaining a p

avatar
Janella
0 1 0 9
asked 07 September, 2021
54 votes
12 answers
2.9K views
upstream sent too big header while reading response header from upstream

I am getting these kind of errors: 2014/05/24 11:49:06 [error] 8376#0: *54031 upstream sent too big header

avatar
Kristopher
0 1 0 9
asked 07 September, 2021