A type of hook that provides a way for content to be overridden programatically

learn more… | top users | synonyms (5)

0
votes
1answer
15 views

I've set up an extra field for all the available widgets. How do I show it's value in the front-end?

Thanks to another great post here I managed to set up an extra field (called "subtitle") for all WP Widgets. Now I am trying to make all WP widgets display the value of this extra field (naturally, ...
0
votes
0answers
57 views

apply_filters to remove some text within excerpt

I created this code below to remove all image captions in an excerpt, but it doesn't work. The image caption text is within the <em></em> HTML tags and I created this regex to remove the ...
1
vote
0answers
70 views

WooCommerce email shipping text value

I'm attempting to use the 'woocommerce_order_shipping_to_display' filter to show 'Free' in the WooCommerce email table when no shipping charges will be incurred. In the image, I'm trying to get 'Flat ...
1
vote
1answer
25 views

Inserting Category programmatically

I am wondering how should i insert the category programmatically and it should insert only 1 time after the theme is activated. I know up to here. function example_insert_category() { ...
0
votes
1answer
31 views

Echo string in admin panel footer beside version no

can anyone help me out about how to showing something lets say "Hello World" beside the version no that shows up in the wp admin dashboard footer? I've already tried the action named admin_footer and ...
0
votes
0answers
43 views

Insert a custom taxonomy as a class in acf gallery loop

I am almost there, but not sure how to echo out a custom taxonomy as a class into my div containing my image. (see all the stuff below). All of the tutorials I see talk about using wp_query and then ...
0
votes
2answers
176 views

ACF Gallery with Media Categories - how do display categories and sort

I would like to use something to filter images within an ACF Gallery. I have added the Enhanced Media Gallery Plugin which will allow me to assign a category to each image, but am not not clear on how ...
0
votes
1answer
36 views

How to change default text for specific post type

Prelude: Let's say the text "Comments are closed" is a default WP String and you wanna change that text string to something else like "Hello World!" if is_singular('post-type') is true. Issue: Now, ...
0
votes
0answers
14 views

How do i get the menu id currently being edited in the nav-menus.php page?

I am trying to get the ID of the menu currently being edited in the backend menus page( nav-menus.php ) under appearance. Is there any filter that returns the id of the current menu being edited ?
0
votes
0answers
49 views

price filter for easy digital download

i have a website with easy digital download plugin, but this plugin not have a price filter like woocommerce. i have search on google and i have found this free and paid plugin ...
0
votes
1answer
55 views

Add PHP code after title in single post pages?

I tried to add PHP code after the post title in single post pages by adding a filter to functions.php, but this did not work: function theme_slug_filter_the_content( $content ) { $custom_content ...
0
votes
2answers
62 views

Modify WP_Post before processing

I am looking for a way to modify WP_Post object before it's processed and displayed on the page. Reason - I built my site when WP was still in version 2.0, or even earlier. I didn't attend to it for ...
1
vote
0answers
59 views

Comment search plugin

I want to develop a plugin which places a search input field above the first comment on the post pages, filters the comments below that post, and only shows the comments which include the string that ...
0
votes
0answers
166 views

Dynamic attachment WooCommerce Follow-Up Emails

I am using the WooCommerce Follow-Up Emails plug-in for my clients website. With this plug-in, I send a e-mail directly after the order has been finished, containing a custom template with WooCommerce ...
0
votes
1answer
33 views

override filter in a plugin

I am trying to remove two contactmethods that were set by a plugin. I've read a lot about adding/removing an action, but found little on adding/removing a filter. Original plugin code: function ...
0
votes
1answer
105 views

Modify WooCommerce email shipping text value

I'm attempting to use the 'woocommerce_order_shipping_to_display' filter to show 'Free' in the WooCommerce email table when no shipping charges will be incurred. In the image, I'm trying to get the ...
0
votes
2answers
24 views

Check filter defined or not?

Is this possible to find out whether add_filter( 'allow_major_auto_core_updates', '__return_true', 1 ); already added or not in some other plugin? or can i check this automatic updates set for ...
0
votes
1answer
32 views

How can I get the default content of WordPress post?

Is there a way where I can get the default output of the_content in WordPress post? Some of the plugin is using add_filter to the content to add their desired result like related post plugins where ...
1
vote
0answers
187 views

Filtering posts list table

My post_type is 'part'. I created a custom field 'Images' this way (simply added new columns to the array): add_filter( 'manage_edit-part_columns', 'my_columns_filter' ); function my_columns_filter( ...
1
vote
0answers
77 views

Customize WordPress Media Manager - Media Window

Im trying to customize the wordpress media manager "add media" window to get it as simple as possible to use. So i want to disable/ hide the following fields/ functions because i dont need some or ...
-1
votes
1answer
50 views

add_filter > posts_where works partially

I started to work with this code: Used with meta_query in query_posts works slowly and i changed the code and started to work with add_filter function filter_where($where = ''){ global $wpdb; ...
1
vote
2answers
218 views

How can I add an Author filter to the Media Library?

By default the WordPress Media Library allows you to filter results by their type or date. How can I add a third drop down to list and filter by author? Currently we have this: I'd like to have ...
0
votes
0answers
78 views

Used with meta_query in query_posts works slowly

Hey i have a problem this my code and if i used with all parameters i get from $_GET its start work so slowly..... (like 5 min). $checkbox = array( 'immediate'=>'כניסה מידית', ...
0
votes
1answer
74 views

How to add post_distinct filter to WP_Comment_Query?

I want to fetch a list of posts with the most recent comments. However I don't wish to simply get the latest comments and have duplicate posts, but I want to group the posts (by their ID). I tried the ...
0
votes
1answer
593 views

WP REST API v2. filters doesn't work

I'm using WP REST API v2 to get posts. When I tried to open localhost/wp-json/wp/v2/posts in my browser I got json with all my posts. I tried to open ...
0
votes
1answer
129 views

How to override filter in child theme?

I'm trying to override a parent theme filter in a child theme; I must have the syntax wrong as the override is being completely ignored. Here's what's in my child theme's functions.php: //* remove ...
0
votes
1answer
109 views

Simple Share Buttons Add Plugin and Custom Post Type

First of all Simple Share Buttons Add is a great plugin to share WordPress contents to social media. Nonetheless, I encountered an issue with it. It is not possible to disable these button on custom ...
0
votes
1answer
87 views

remove/hide wp-editor

I have created a meta-box for a certain page_template. So if the adminpage is loaded with the template it shows the metabox. This does not require the wp-editor to add content. So I would like to ...
0
votes
0answers
17 views

Store Variable to be used Across Admin All Post Page

In the main taxonomy admin page (All page, All post, WooCommerce Orders, etc.) I am looking to store a variable to be stored for the page and then be used by a filter for each individual item row. ...
0
votes
0answers
9 views

Wrap <figure> for image inser from url?

I have checked here Always use <figure> for post images but it is not used when I insert image from url, it appears like normal in editor not wrap figure tag. Someone can help me ?
0
votes
0answers
61 views

WordPress registration: checking external database to see if name/email exists, then show error message

During registration (creating a new user account), in addition to checking the wordpress database, to see if user name or email already exist, I want to also check an external database. My code ...
0
votes
1answer
54 views

How do I hide tinymce within the edit screen of a particular page

I have a page. The page is assigned a unique page template. The template will use a custom loop. This loop will not call the content of the particular page. I'd like to hide tinymce from the user. ...
0
votes
0answers
31 views

Checking if text from product 2 is equal to product 1

I am using Woocommerce product addons to allow users to upload a pdf file when ordering 2 products. I would like the following logic to be applied when both items are in the cart. If filename ...
0
votes
0answers
39 views

Cron schedule interval through plugin options?

My plugin sets up a CRON job on plugin activation to run after every 5 minutes. I want to provide a section in my plugin settings page, where the user can specify an interval. How would I do it? I am ...
1
vote
0answers
206 views

add_filter hook redirect view cart button in woocommerce

In my current multilanguage wp project I'm trying to redirect the user from the checkout (which is in the current language choosen by the user) via "view cart"-button to a translated cart page. ...
0
votes
0answers
102 views

How to get to the date of the uploaded file

Anyone can tell which is the filter (if there is any) used for the date of an uploaded file. This can be useful to limit the upload for the users based on the time.
0
votes
1answer
22 views

Getting entry ID from frm_email_message filter in formidable

Using the filter frm_email_message in formidable I want to change the message body in an email but I need to get the entry id. I can get it using a different filter frm_email_value. Is there a way ...
0
votes
0answers
54 views

how to find add_filter hook name?

I'm using jetpack photon. but it's not cache sidebar widget's image. so I found this code function jeherve_photonize_text_widget_images( $content ) { if ( class_exists( 'Jetpack_Photon' ) ) { ...
0
votes
0answers
12 views

Which filter called the function [duplicate]

I've created a function that does some replacing of urls and is called by several filters: add_filter( 'theme_root_uri', array( $this, 'replaceCDN' ), 99, 1 ); add_filter( 'plugins_url', array( ...
0
votes
0answers
51 views

Access to Payment Gateway Configuration Data in another plugin WooCommerce

I'm trying to get configuration's data from a Payment Gateway. But I just checked that there is a field in wp_options "woocommerce_nameofgateway_settings" and it's serialized. Is there a easier way ...
0
votes
1answer
33 views

How to add more than one custom metadata as filter on the post list page?

To add a filter based on metadata to a post we use the following format: $wp_query->query_vars['meta_key'] = 'meta_key_name'; $wp_query->query_vars['meta_value'] = meta_value; How can I add ...
0
votes
1answer
114 views

How to customize category_description()?

In a website I am working on ,there are 50 categories + sub categories, each has a a very long description text, then in an archive page I display all the titles of the categories + their description ...
-1
votes
2answers
209 views

How to hook into permalink when publishing-saving post?

I want to know how I can change the structure of the permalink to my desired one before saving or publishing my post in Wordpress? For instance, when I add the title like the wordpress blog in my post ...
0
votes
1answer
55 views

Do “switch_to_blog()” and “restore_current_blog()” re-run the filters?

I've been working on a Wordrepss multisite network and came across very common requirement of displaying a common navigation menu across all sites. Use switch_to_blog() and ...
0
votes
2answers
172 views

Yoast SEO hooks overriding themselves

I have some dynamic templates where I have to customize the canonical links. According to Yoast documentation the hook to use is wpseo_canonical I have two functions pointing to different pages ...
1
vote
1answer
23 views

Ignore dots when searching in the media library?

As the title says, is it possible to ignore dots in search field in media library?
1
vote
1answer
28 views

What hook/filter can I use to add/edit/show/hide the title under (on hover) links on the table view?

I'm not entirely sure the name given to these links, but the class is called "row-actions".
0
votes
0answers
327 views

How to create a category filter on custom archive template?

I am trying to filter posts by category on a custom archive / template page. My template page currently has a custom query which displays posts from four specific categories. Then I have a select ...
0
votes
0answers
20 views

Adding Information To All Posts Screen

What I'm looking to do is add the value of a post's metafield in each post's row on the all posts screen. I'm attaching a screenshot of where I'd like this information to show up. The info would be ...
1
vote
1answer
34 views

Filter Media by Featured on Admin

Usually we can filter images in Media > Library by: date by MIME type, and by attached/unattached files ...but I'd like to expand this to a filter by Featured images. This way, we could filter ...