Tag: php

61 votes
9 answers
1.3K views
Reconnection of Client when server reboots in WebSocket

I am using web socket using PHP5 and the Chrome browser as client. I have taken the code from the site http://

avatar
Keith
0 1 0 9
asked 07 September, 2021
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
3K 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.6K 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
763 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.5K 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.6K 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
365 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
392 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
268 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
3K 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
61 votes
14 answers
2.8K views
#1273 - Unknown collation: &apos;utf8mb4_unicode_ci&apos; cPanel

I have a WordPress database on my local machine that I want to transfer to a hosted phpMyAdmin on cPanel. Howe

avatar
Nidia
0 1 0 9
asked 07 September, 2021
65 votes
23 answers
601 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