I have a front-end editing form, where users can update specific post data (ACF custom fields). The problem is, that the users only know the post slug, not the ID. So I need a page before, where I can convert the slug to post ID, then pass it as a url parameter, and redirect to the update page above. I
Tag: slug
WordPress: Add directory to post slug with function
I want to add a /news/ before every post slug. Like this: example.com /news/ post-slug/ If I add the /news/ in the permalinks settings, every custom post type is broken after it. I tried to add the following to every register_post_type: But that doesn’t help. I also tried the code from here: Unfortunately that doesn’t work either. Is there any
How to get attribute name instead of slug in variation?
I need to get attribute from woocommerce product variation. This code is giving me an attribute slug instead of name. How can I get attribute name? Thank you so much in advance! Answer What you are getting is the slug of a taxonomy… In WooCommerce, attribute_pa_color without the attribute_ is a taxonomy. So you can try something like this.. to