Skip to main content

Unanswered Questions

3,254 questions with no upvoted or accepted answers
5 votes
0 answers
600 views

Best way of removing emoji support from url / slug only

Couldn't find anything on the topic. I guess something could be done with the 'wp_unique_post_slug' filter but how would I go about just removing the emojis from the slug? I've tried all kinds of ...
4 votes
1 answer
201 views

@wordpress/create-block image url in css

how to include image URL to css "style.css" in custom block? Both these not work: background-image: url("images/imagename.png"); background-image: url("./images/imagename.png&...
4 votes
0 answers
208 views

Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?

I inherited a couple of WP + WooCommerce shops with roughly 30,000 products for sale each, and a wp_postmeta which is over a million lines. The former webmasters ran away. In an effort to clean up old ...
4 votes
1 answer
1k views

Custom taxonomy on permalink

I have a long time problem and look forward for your help. I have a custom taxonomy of "city" (it is no hierarchical like tags). I just would like my URLs to look like this: /%city%/%category%/%...
4 votes
0 answers
2k views

get_permalink returns default link

I hope you can help me. So I'm using /%postname%/ as permalink structure, and my htaccess looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /develop/...
4 votes
0 answers
194 views

permalinks with get variables

I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows add_filter( 'query_vars','driver_vars' ); function driver_vars( $vars ) { ...
4 votes
1 answer
557 views

Which of WordPress's .php files need to be directly accessible via HTTP?

I'm trying to tighten up security on my WordPress installation, and one of the things that seems like it might be a good idea is preventing all of the internal-use .php files from being accessed ...
3 votes
0 answers
90 views

Child post with numeric only slug keeps redirecting to parent

I modified the allow-numeric-stubs plugin code to work with CPTs. You can view my forked repository here: https://github.com/akshatkedia/allow-numeric-stubs WordPress is now allowing numeric slugs for ...
3 votes
0 answers
266 views

Taking a value from PHP_URL_PATH won't work after WordPress 5.5 update

A custom WordPress module takes certain int variable directly from the PHP_URL_PATH roughly like this: private function myIdVariable() { $myid = 0; // Support both URL formats: /path/123 and /...
3 votes
1 answer
5k views

Is there a Woocommerce hook that fires when applying a coupon but before checking if it's valid?

I want to add an item to the cart (that same item gets discounted with the coupon) upon using a coupon code (with a hook). E.g. when using the coupon code SAMPLECODE, a product is added to the cart ...
3 votes
0 answers
875 views

Using 'Primary Category' in URL

I'm running into an issue where I want to set up categories in my URL (%category%/%postname%), but doing this will create multiple URLs for the same content if I select multiple categories. So, for ...
3 votes
0 answers
294 views

WooCommerce Subscriptions: Show monthly Price for annual Product

Using WooCommerce Subscriptions, is there a way to show a monthly price as well as a "total duration" price? On my site I have subscriptions for a month and others for a year. Those for a year look ...
3 votes
1 answer
3k views

How to get orders with used coupon in WooCommerce

Im trying to get orders in WooCommerce (ideally through wc_get_orders) where the coupon code "some_code" was used. My try: function get_orders_with_coupon($coupon){ $customer_orders = ...
3 votes
0 answers
1k views

Is it possible to intercept all ajax requests and get the parameters and the returns?

Is there any hook that always goes through it, where I can see all the requests, and also the returns after the "action" that is executed? I need to intercept all requests, including requests from ...
3 votes
0 answers
585 views

Custom URL rewrite to specific page template

I have a standalone page with the slug: hubv2 that is using a custom page template which runs a small React app. The React app handles in browser routing and it works fine. For example I can hit /...

15 30 50 per page
1
2 3 4 5
217