Viewed 4 times 0 I need to return all posts that have the value of a specific attribute that is saved in the custom block attributes gutenberg. This value in the query will be according to the endpoint below. http://idinheiro.local/wp-json/idinheiro/v1/blocks-posts/id-here-attribute-gutenberg-block below my callback function. In short, how do I look for this attribute and put it there in get_posts? Register
Tag: wordpress
ACF pro – frontend form and WordPress categories while creating post
I try to build page where user can fill the form (using my custom ACF PRO fields) and save it as a post. Then admin need to check it and publish if everything is OK. So far I have form based on custom post type and ACF fields work good so far. But I need to display checkboxes with native
How can I place PHP anonymous function to execute CSS inside another function in WordPress
I am not a programmer so I’m sure this is a no brainer. I am trying to disable a popup if Wordpress users are not logged in. I am using CSS to disable the popup for a specific Woocommerce plugin. The CSS code works fine if I use it by itself. However, when I try to use it with the
convert curl post to wp_remote_post
Here is curl code which is working very good But if i try to convert this above code to worpress wp_remote_post i am getting error. here is response i am getting https://pastebin.com/Ap5LpfZb Please let me know where i am doing wrong ? Answer I got it there was problem with the header array i was passing that array wrongly Wrong
advanced custom fields can’t do nested loops repeater inside repeater have_rows() not doing anything
I have a repeater inside a repeater and I need to loop what is in it. I’m following this: https://www.advancedcustomfields.com/resources/have_rows/ This is my field structure: So with that in mind, as I understand it, I need to loop over agenda_section_events and inside that I need to get rows https://www.advancedcustomfields.com/resources/have_rows/ So that code looks like this: I’m really confused because all
Rename “Have A Promotional Code?” in Woocommerce
check please: http://www.baroniarialb.cat/finalitza-la-compra/ I have AVADA and Woocommerce theme installed, but I need to change the “Have A Promotional Code?” and I can’t find the correct code to do it. I have already tried different ways that appear on the internet without success from funtions.php. Could you guide me? Answer Try this code. I’ve tested from the my side and
WordPress show Edit and Delete buttons only if post’s author
My wordpress site uses post submissions (actually, CPTs) from site members. When displaying the CPT post, I’d like buttons to appear for Edit and Delete when the author is viewing the post, and not appear if any other member views the post. I’ve researched code and plugins, but all seem to only apply to the author role, not the specific
Worpress file permisions and ownership after migration
I am using wordpress on mac and I did a migration to a new macbook, since then I have been having loads of problems with file permision and ownership. First I was having the: I fixed this by adding this entry to the wp-confing.php Then when I tried to update a plugin, I got the: And I fixed that by
css in the menu does not work because the id is pushed into the wrong container
i want to use this code in wordpress. The first code shows the working code. The second code shows how it is displayed in Wordpress when I use this position <?php wp_nav_menu (array (‘menu_id’ => ‘main-nav’,)); ?> it is packed in the ul but it has to be represented as above around the code in the surrounding container. Code Code
Schedule WooCommerce sale price based on days of the week
Running a restaurant delivery website, I would like to create sale products based on “days of the week”. Tuesday 5 products Wednesday 10 products Saturday 6 products For example, if Tuesday and product id is on sale, then sales price should be shown. I tried re-using this but can’t find a topic about adding the sales price. Answer I havent