wp doesn’t recognize my plugin if I don’t login as WP user (or as WP Admin)

Although the RFC for cookies implies that dashes are OK in a cookie name, others have experienced issues with using dashes in a cookie name. Try changing the name of the cookie to something without a dash. Only alphanumeric characters are allowed, but underline characters seem to be OK. Reference this question/answer: https://stackoverflow.com/questions/18907771/can-http-cookie-name-contain-dashes/27235182 ; the … Read more

How to make WordPress orderby work with post_excerpt column?

I edited the wp_playlist_shortcode function at \wp-includes\media.php WP core file, by adding if ($atts[‘orderby’]==’excerpt’ || $atts[‘orderby’]==’post_excerpt’) { function cmp($a, $b) { return strcmp($a[“caption”], $b[“caption”])*(-1); } usort($tracks, “cmp”); } before $data[‘tracks’] = $tracks; line. Basically after all tracks are generated into the $tracks array and before this array is passed to the final array $data, I … Read more

Notifications on WordPress Website [closed]

Try BuddyPress. It covers majority of your functionality. Or you can go with custom approach using Custom PHP script and AJAX with custom tables created in Database. Here is a link to such tutorial. https://www.cloudways.com/blog/real-time-php-notification-system/ EDIT : I don’t know what approach you are following. But considering you are using WordPress Post and Comments. Create … Read more

Escaping and Special Characters (e.g. &)

If I put <script>alert(‘hello’);</script> in the title of a WordPress page with the default theme the script runs. This is expected behaviour. HTML is typically allowed in titles in WordPress. The standard WordPress function, the_title(), does not escape the title. If you don’t want to allow script tags then you need to sanitize the input … Read more

Woocommerce – Product Description heading [closed]

You can change the description tab heading to the product category followed by the name using the following snippet add_filter( ‘woocommerce_product_description_heading’, ‘product_description_tab’, 10, 1 ); function product_description_tab( $title ) { global $post, $product; $categ = $product->get_categories(); return $categ.’-‘. $post->post_title; } According to above code, you can get product brand. I hope that’ll solve your issue. … Read more