Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

How to customize WP_Error (REST JWT authentication plugin) [closed]

🔖 Background & Environment WordPress 6.6.2 JWT Authentication plugin 1.3.4 Php 8.3 I'm using the recommended plugin JWT authentication for WP REST API, to authenticate my users. Asking /wp-...
Adrien Villalonga's user avatar
1 vote
1 answer
57 views

Unable to remove action from parent theme via child theme

The Blank Slate theme (in its functions.php) adds a jQuery script to each page, which I would like to remove: <?php /* ... */ add_action( 'wp_footer', 'blankslate_footer' ); function ...
The-Coder-Who-Knew-Too-Little's user avatar
0 votes
1 answer
28 views

Two related taxonomies. how to filter terms in second taxonomy depending on selected term in first taxonomy on Post edit page?

I have two custom taxonomies on the site - Countries and Cities. The Country taxonomy contains over 200 terms, and the Cities taxonomy contains over 47,000 terms. Naturally, editing content with ...
Toologic's user avatar
0 votes
1 answer
29 views

Can't retrieve custom post type taxonomy term to custom post type editor

I have 2 main problems: I can't seem to add editor_name custom field to default/native WordPress list of request URL query parameters. This is the request WordPress is using: http://localhost/wp-...
neke90's user avatar
  • 1
2 votes
1 answer
15 views

Modify upload directory to use post category slug in file path on multisite installation

I am using the default post type and category taxonomy to manage the content on an in-development website that is using WordPress multisite. There are categories defined like "bylaws" and &...
Mike Hermary's user avatar
0 votes
1 answer
27 views

Remove 3rd party plugin notices from within own plugin

I'm trying to build a plugin (complete novice) and on the landing page of my plugin I don't get the 3rd party plugin notices / banners but with all of my sub pages I do. How can I completely remove ...
demo7up's user avatar
  • 178
0 votes
1 answer
28 views

is there a list of actions on Wordpress

Often, I see a lot of useful functions under "add_action" for example "plugins_loaded", "admin_init", "show_user_profile", etc. Is there a website or similar ...
Rodrigo Moya's user avatar
2 votes
1 answer
113 views

WooCommerce Webhook Action When a New Product Review was Submitted/Created

I'm looking for a WooCommerce action hook, whenever someone submits a product review via the review/comment form. Can't find anything about this in the documentation or web. I like to trigger a ...
Bert Kößler's user avatar
0 votes
1 answer
41 views

My custom meta box with textarea field not saved

I created a custom meta box for my custom post type with address, phone, and map but only the map field type textarea not saved. My code here: // Add meta box function vn_store_add_meta_box() { ...
Quốc An Trần's user avatar
0 votes
0 answers
65 views

Show post in elementor based on views and specific category with query id feature in elementor

I have two functions for query filter: function my_query_filter_most_views( $query ) { $query->set( 'orderby', 'meta_value_num' ); $query->set( 'meta_key', 'entry_views' ); $...
Danial Sohail's user avatar
0 votes
0 answers
20 views

update_post_meta returns ID, but nothing in the database

I am facing a weird issue here and can't wrap my head around it. I am using the woocommerce_checkout_update_order_meta action to add custom data to an order. In the callback function I use ...
swiss_blade's user avatar
0 votes
1 answer
16 views

Custom fields empty after refreshing page

I have added some custom fields to the Gutenberg editor, the purpose is getting these custom fields loaded in the custom-post-type. Thats is all working, I was able to get the custom-fields in the ...
Brango's user avatar
  • 1
0 votes
0 answers
20 views

custom post type with metabox custom fields

how to make meta custom fields in custom post type name jobs_board_cpt , I am using boilerplate ? public function jobs_board_cpt() { $labels = array( 'name' => ...
Muhammad Ashfaq's user avatar
1 vote
1 answer
46 views

Metabox conditionals depending on post format and template in Gutenberg

In the classic editor, I used jQuery to display metaboxes depending on the current post-format or page template selected. If a user selected a different format or template, they would toggle depending ...
kath's user avatar
  • 621
0 votes
0 answers
149 views

Submit CF7 form programmatically with WP-Cron?

We need to check daily if our CF7 form is working properly (form submission data arrives to support's email). So i need a way to programmatically submit the form on frontend. I tried with WP-Cron but ...
Ion T's user avatar
  • 45
1 vote
2 answers
147 views

How to change content hash value, within the_block_template_skip_link action?

When my WordPress site loads up, towards the top, I have something that is generated in the DOM.... <a class="skip-link screen-reader-text" href="#content">Skip to content<...
klewis's user avatar
  • 899
1 vote
1 answer
24 views

Add a post when another post type is inserting

I want to add a product when service post type inserting or updating. Below is the code. It works but it keep generates products while the code executing. What is the wrong with this code? add_action( ...
Avijit Palit's user avatar
0 votes
0 answers
17 views

I am trying to implement some logic on real time order sync using scheduler

I am trying to call a function using the scheduler, wp_schedule_single_event, it is successfully scheduled but the function related to the hook is not called.
Kapil Sharma's user avatar
0 votes
1 answer
405 views

index.php file shown when trying to load wesite

I am trying to make a website as a task for my university. I used this tutorial: https://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview the first time I did it it was fine , but I ...
Giannis's user avatar
0 votes
1 answer
177 views

Execute wp_after_insert_post after the permalink is customized

I'm trying to set a meta property to a new post's permalink using update_post_meta. When I run this on wp_after_insert_post I get a permalink that ends in "?p=[ID]". If I update the post to ...
Tim Troiano's user avatar
0 votes
1 answer
37 views

Second featured image only shows in metabox preview after saving a post in the wordpress editor

I am trying to add a second featured image to the Wordpress post editor, and it seems all be working. When I select and image from the mediauploader the first time the image shows in the preview of ...
Brango's user avatar
  • 1
0 votes
1 answer
37 views

How to use add_filter to add the extra data to existing array?

Hi I am new to hooks and have a query to add additional data to the existing array. Please check the below code. I have some basic details and want to add the Phone number using add_filter(). If I ...
Manikandan's user avatar
1 vote
2 answers
181 views

Function attached to cron job not running but will run if called manually

I have a cron job set up with the following code in my functions.php file I have a CPT with a custom field that defines an expiration date for each post. All I am doing is checking if the date has ...
grzybowski1911's user avatar
0 votes
1 answer
160 views

wp_update_post breaks my function

Good evening! I'm trying to adjust the post title + some ACF fields after a user have submitted a custom post type ('booking'). The function I've created almost works! The only problem is that ...
joxyzan's user avatar
  • 13
0 votes
0 answers
24 views

How to enqueue additional scripts and styles after loading another post into the DOM?

If have a post_showcase shortcode that takes in post_ids as parameters. The shortcode generates buttons that when click will load the given post into a modal. However, the shortcodes within the ...
Gus Beringer's user avatar
0 votes
0 answers
30 views

coauthors_plus_edit_authors to display metabox based on author caps

Need to display the coauthorplus metabox with author capabilities. On the documentation of the plugin they say its only with super admin and editor that the metabox is available. Any idea to add a ...
made leod's user avatar
0 votes
0 answers
40 views

Wordpress Action Hook inside Classes

The WordPress plugin is functioning correctly, and within the functions.php file, I aim to establish tabs using arguments and hooks. These tabs should consist of both a tab menu and tab content. ...
aldin_abdagic's user avatar
0 votes
2 answers
80 views

Too few arguments - wp_login action

I'm looking for a way to avid that some custom users roles are able to see wp-admin dashboard. I've found this topic and in my plugin class I've tried to use the two action suggested, but I will get ...
OHICT's user avatar
  • 133
0 votes
1 answer
56 views

wp_head filter not executed inside custom class

I have this code in a simple plugin that is supposed to make wordpress unbranded: <?php /* * Class to remove wp-* branding from WordPress * @package users-manager.php */ class WpUnbrand { ...
OHICT's user avatar
  • 133
0 votes
1 answer
89 views

doesn't save custom meta box data wordpress

My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code: <?php // Function to add a metabox function ...
Tivan Cell's user avatar
0 votes
1 answer
41 views

add_action() not working for admin

Making my own custom plugin and using add_action several times without a problem with one exception. Currently function below are located in functions.php in the appropriate themes folder. function ...
PerK's user avatar
  • 28
-1 votes
1 answer
222 views

Wp redirection doesn't not change url in browser

I'm writing a WatuPro plugin customization. I need to redirect users to specific url when an exam is completed. I have to do it by code because i need to attach some dynamic get parameters to the ...
user31929's user avatar
  • 101
0 votes
1 answer
81 views

Only display top level taxonomy on the edit post page with option to expand sub-categories

We have a custom taxonomy that is hierarchical. It has so many sub-categories that to scroll through them in the edit post page is proving problematic for editors. Is there a way to initially show ...
Ralpharama's user avatar
1 vote
1 answer
196 views

Using add_meta_box on a page with file upload and importing fields

This must be fairly simple :) I'm trying to import data into ACF repeater fields and am mostly following the answer to Add special meta box to custom post type But what I have below isn't saving the ...
BlueDogRanch's user avatar
0 votes
1 answer
20 views

Saving custom input from settings sidebar of pages in Wordpress

I created a meta-box with an input field in the settings sidebar of pages. Now I try to save the value, but it does not work. Maybe the problem is, that I try to do this with pages and not with posts. ...
Jessi's user avatar
  • 3
0 votes
0 answers
124 views

Disable RSS /feed/ endpoints on posts without disabling RSS overall

I recently found that Google Search Console has picked up the RSS links for the individual posts and pages on a client site and is attempting to index them. For example, https://example.com/this-is-...
kevinmcgillivray's user avatar
0 votes
1 answer
59 views

Add custom button to the changeset status in the Customizer

I would like to add custom button to changeset_status in the Customizer actions. Any idea how can I do that? Thank you.
Victoria Lievikova's user avatar
0 votes
0 answers
776 views

How to use render_block filter in Gutenberg when editing a page?

I am trying to add new content after updating a page. I've tried the code below, which doesn't seem to have any effect. I've tried core/paragraph and core/code in the if statement below but still no ...
user1448031's user avatar
1 vote
1 answer
590 views

Why does add_action() not run when placed in register_activation_hook()?

I have questions about executing add_action() in a Wordpress plugin. I was attempting to insert into the tag via the plugin i wrote. I had this (which never ran, btw) function tt_add_GA4_header() { ...
extensa5620's user avatar
0 votes
1 answer
35 views

Why does my function create extra empty files?

The code below, added to functions.php, is saving the texts (pre-formatting) of the posts when they are saved, published, or updated. During the first run, I also added save_all_post_to_database() to ...
Yulia V's user avatar
  • 115
0 votes
1 answer
192 views

How to change the text of Publish Button

I am trying to change the text of the publish button to save. I could change the text. BUT, When I click Status Edit button and OK button, it change "Publish". How can I fix this? This is ...
amy's user avatar
  • 3
0 votes
1 answer
302 views

How can I put a checkbox in the post editor

Up to now I'v been able to insert text custom fields and number custome fields in my post editor page, now I need to insert a checkbox, as a new meta field. I write here the code I have for a number ...
Andrea Sacconi's user avatar
0 votes
1 answer
101 views

How to get variable from other function inside class function using add_action for Ajax call

I want to access to variable "$sha256" from one function in other one that use both of them an add_action for Ajax call. I read that I must use a class function and add add_action with ...
imagIne's user avatar
  • 105
1 vote
2 answers
367 views

Is there a hook that I can use when a fatal error occurs?

Ideally I would like to log the user or page that triggers a fatal error so that I can follow up with that person or go directly to the page they were on for testing. My thought is that if there is an ...
Aristocles's user avatar
0 votes
0 answers
222 views

How to consume external API from WordPress post editor and display the response data in the custom field?

I am developing a custom post type called "Team," where I will add some profiles of team members. I am using ACF for the custom field to add personal details of the members (I can also ...
Rousnay's user avatar
0 votes
1 answer
143 views

how making a selection from a taxonomy selector fixed definitively

I have created a taxonomy “Ospiti” (guests) and set a selector in order to write the number of guests. If I select the number “7” and then edit the post , I see in the posts admin colum the n “7” ...
Andrea Sacconi's user avatar
0 votes
1 answer
91 views

How do I set a custom post type Category after import using wp_set_post_terms

I'm importing Events from a Salesforce Event Manager into WordPress, specifically into the The Events Calendar. The Events Calendar creates a CPT called Events. It also has its own Categories, which ...
Mikey B's user avatar
0 votes
2 answers
228 views

Is there a way to remove the Add boxes from the Screen Options menu metabox?

I'm removing the default metaboxes like so: function rh_remove_dashboard_widgets(){ remove_meta_box('dashboard_activity', 'dashboard', 'normal'); remove_meta_box('dashboard_right_now', '...
Ryan's user avatar
  • 63
1 vote
0 answers
38 views

Post meta box data not saving

The meta box, fields, etc. are all displaying correctly but when I go to update the page it seems the data in those boxes has not saved. Any ideas? Using a custom post type called 'question'. Would be ...
Tom Foster's user avatar
0 votes
1 answer
63 views

Saving metabox updates causing fatal error

I'm teaching myself from a plugin tutorial dvd, everything was going fine. I've setup custom_post_types and the metaboxes with no issues. The issue i have is a fatal error when i update/publish the ...
fuzzy2023's user avatar

1
2 3 4 5
62