Unanswered Questions
2,676 questions with no upvoted or accepted answers
7
votes
1
answer
2k
views
Registering menu with 'Automatically add new top-level pages to this menu' selected
Is it possible to register a menu inside of a theme functions file and have 'Automatically add new top-level pages to this menu' pre-selected? I can't find any info about this in the ...
6
votes
2
answers
661
views
Link to Author archive from Navigation Menus in dashboard?
I'd like to display a grid of authors on my site showing the name of the author and their avatar. The tricky part is, I'd like to be able to control this from the Menus page in the dashboard so I have ...
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
0
answers
4k
views
x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response
I would like my dev server on http://localhost:8080 to work with my wordpress install's rest api, of which the api base url is at http://localhost/wptest2/index.php/wp-json/ I am currently getting the ...
4
votes
0
answers
171
views
Additional Option on Custom Header admin
I would like to extend the Custom Header class to include an animation feature for the header graphics. Essentially, I'd like to add another possible value for the radio button for randomization. The ...
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
293
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
1k
views
Add Product categories to Wordpress menu without losing hierarchy
I need to add product categories to Wordpress menu, but when I'm doing this with WP interface it lose the hierarchy
I tried with WP-CLI, but there is no method to specify wich item is the child.
...
3
votes
1
answer
573
views
Replacing the NavWalker dropdown element
I'm creating a website for my school with Material Design for Bootstrap and the NavWalker is giving me some issues, I want to change the element of dropdown i.e. from ul to div. I've tried to edit the ...
3
votes
1
answer
793
views
Add Menu items description via Custom Walker for wp_nav_menu()?
Here is a solution I've found, and it works to append a description after the link.
My question is: Is it also possible to append a description before the link?
function add_description_to_menu($...
3
votes
0
answers
55
views
HTTP Header on specific page is application instead of text
Problem: clicking on (WP site that I developed) webejeeping.com/vehicles/ causes the generated php file to be downloaded instead of being rendered in the browser. MIME Type returns as "application/...
3
votes
1
answer
2k
views
Add div to specific sub-menu
I researched in google, yandex but had no success.
With this code I can set a div to sub-menu but this code add to all sub-menus, I just need to add div to specific sub-menu.
class Megratron_div ...
3
votes
1
answer
632
views
Generate a tabbed submenu — from taxonomy term or submenu item — with sample content
I'm looking to generate a tabbed submenu from taxonomy term or submenu item and include sample content (three items per term/submenuu item). The styling I can do, the problem is the html generation.
...