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

learn more… | top users | synonyms (5)

2
votes
3answers
52 views

Getting my head round WordPress filter

I am following a tutorial that will hopefully allow me to insert templates straight from my plugin into WordPress. I am using the template_include filter, I can't get my head around how the whole ...
0
votes
0answers
52 views

Restrict access to custom post type and filter from every query

I created a custom post type topic which is just for internal use. I managed to assign the correct capabilities so that users of certain roles can edit/publish/delete posts. Now I want to redirect ...
0
votes
0answers
44 views

Woocommerce: filter related products

I have a custom field created for products named 'expiration_date' and need to filter out when past its date specified. I found how to do this for the shop with the following code, works well: ...
0
votes
1answer
266 views

Filters post in admin with dropdown select, custom post type

I'm trying to filter my post in my admin area with a custom filter dropdown. I use this method to make it: http://wordpress.stackexchange.com/a/45447/84541 Here is my code: add_action( ...
0
votes
0answers
13 views

Filter paginated post

I'm tring to build a directory of clinics. I'm already able to search by location and treatment, filter results (clinics) by services (wi-fi, parcking, ...) and paginate them. ...
0
votes
1answer
33 views

`authenticate` filter never gets called

I've added and network activated a plugin with this code: add_filter('authenticate', 'my_authenticate', 1000, 2); function my_authenticate($user, $username){ // We never arrive in this function ...
0
votes
1answer
30 views

Customize title, description and focused keyword [closed]

I would like to customize focused keyword, SEO title and meta description, but I am unable to find any clue how to do it. There is official documentation but it is sooo lacking... I came up with ...
0
votes
0answers
71 views

How to filter woocommerce order with category

I want to filter orders by category of products, what I have tried based on research is : $filters = array( 'post_status' => 'any', 'post_type' => 'shop_order', 'posts_per_page' => 200, ...
3
votes
1answer
53 views

Ignore a filter on the media library

As per my question yesterday, I need to exclude all images from most of my WordPress queries - yesterday, I thought I needed to exclude them from all queries, until I came upon the following issue. ...
2
votes
1answer
58 views

Error when overriding only some audio shortcode HTML output

Context I have a function that overrides audio shortcode HTML rendering, thanks to a WordPress hook: wp_audio_shortcode_override I used it this way in an OOP plugin: add_filter( ...
0
votes
0answers
40 views

woocommerce_get_country_locale hook not working

I am trying to override the "woocommerce_get_country_locale" hook in many ways, why its need mean? I need to remove the state field for particular country! Shown below are what I tried? Attempt 1 ...
0
votes
1answer
34 views

Retrieve a custom form field modified by a filter

I use a 3rd party plugin that creates a form with some fields. I want to use one of these fields in one of my templates. Is there a way to do this? UPDATE I found a solution, see the accepted ...
0
votes
0answers
28 views

Change name of Register link

How can I change the name "Register" to "Signup" in my site? add_filter( 'register', 'change_register' ); function change_register( $link ) { $link = str_replace( "Register", "Signup", $link ); ...
0
votes
1answer
37 views

Converting restricted html in comments to bbcode

Problem: Wordpress multisite only allows the Admin account to include images in html for security reasons. It is possible to install a plugin that turns off these restrictions, but it apparently opens ...
0
votes
0answers
20 views

Is there any hooks or filters to detect an action after user upload video to AWS (Amazon Web Service)?

I am using the plug-in AWS and offloads3 to upload video to AWS, however, I would like to find a hook or filter to detect a state when after user uploaded video/image successfully to Amazon web ...
0
votes
0answers
32 views

What is the simplest way to allow users to narrow down their search for adoptable animals?

I am working on a website for a animal rescue/shelter. I would like to allow users to narrow down their search through the many dogs and cats, by for example setting a filter for only "big" dogs, or ...
0
votes
1answer
37 views

Is it possible to filter the main loop to exclude posts from a specific category?

The question is the same as the title. I'm talking about the default loop on the blog page / home page. I am using a network blog and must apply it to all blogs.
0
votes
0answers
25 views

Hooks after media is saved

Is there any hooks/filters that fires when user already uploaded image/video . Thank you
0
votes
1answer
68 views

Filter existing hook using parameter and foreach loop

I am trying to create a filter to add a custom column to the edit page of any custom category that might exist in Wordpress. I am aware that the filter hook must be in the form, ...
0
votes
1answer
178 views

Genesis filterable portfolio isotope [closed]

I've this working genesis filterable portfolio and I want to share with You. I was inspired by It works at any level of tax you are and show only the immediate child-terms to filter (like you can ...
0
votes
0answers
11 views

Overriding Customizer setting value by url parameter value

Is it possible to override a specific setting of Customizer based on url parameter? For example, I have a setting main_layout which has values like left_sidebar, right_sidebar and full_width. The ...
0
votes
3answers
98 views

Add review box by function at top or bottom of content

Filter add_filter( 'the_content', 'sandy_posts_filter' ); function sandy_posts_filter( $content ) { global $post; $review_box_pos =get_post_meta( $post->ID, ...
2
votes
1answer
40 views

customizing the_password_form filter

I'm trying to customize the_password_form to integrate it with bootstrap inline-forms with an add_filter() function: function custom_passowrd_form ( $form ) { global $post; $label = 'pwbox-'.( empty( ...
0
votes
0answers
23 views

How to integrate a code through function

so I'm having this big issue with replacing a code with another via function. I just copy pasted an example code from the plugin developer which at the moment is unable to assist me. This is the code ...
0
votes
2answers
70 views

Adding multiple taxonomy filters to functions.php

I need to add multiple taxonomy filters to the functions.php file to remove (3) irrelevant taxonomies from the Yoast SEO sitemap index. I have been able to successfully add one filter, but when I add ...
0
votes
2answers
55 views

How to manipulate wordpress template tags' output

take the_category() as an example: Here is the output of the_category function in the wordpress loop: <ul class="post-categories"> <li> <a ...
0
votes
0answers
22 views

Custom Post Type Column Filter Not Populating HTML Select After Filtering

I am trying to setup a custom post type column filter. When the custom post type management page displays the filter is populated with all of the course custom post types. I then select an option and ...
0
votes
1answer
26 views

check, if any “add_action” function contains string XXXXXXXXX

i want to filter out any function, that output such string : http://twitter.com/xxxxxx.js (this is example,i will need other strings to filter out..) is there any way, to find which "add_action" ...
0
votes
1answer
59 views

What is the proper/best way to have multiple add_filter for wp-job-manager-resume

What is the best/proper way to implement multiple filters from one function or using my add_filter one time? If I can not combine multiple functions or actions in my one filter what is the proper ...
0
votes
1answer
29 views

What scope is $blog_url = get_bloginfo() inside a function

Inside a plugin, I am attempting to filter the WordPress 'from' email name to a dynamic value instead of the default 'WordPress'. add_filter( 'wp_mail_from_name', function( $name ) { $domain_url ...
1
vote
1answer
82 views

Modify Image Source With The_Content Filter?

I'm very inexperienced with regex, however I'm trying to create a function that filters through the_content() and get_the_content() in order to modify the SRC of all images. The intended purpose ...
0
votes
0answers
58 views

How Do I Add a Custom Field Inside a Gravity Forms Field?

I would like to add a custom field inside a gravity forms field. The custom field should accept HTML syntax. Here is an illustration of what I would like to achieve: To be specific, how do we add ...
0
votes
1answer
49 views

Is there a wildcard/catchall filter hook?

I would like to filter all the options values, but the option filters are option specific. Is there a way I could do something like add_filter('pre_option_*', 'my_check'); ?
0
votes
1answer
153 views

How to add attributes to WordPress Admin Sub Menu List Items

I have been trying to find a way to add a class or an id to my custom administration sub menu. I only see a class on the first menu item. I would either like to add a css class or an ID on my sub menu ...
0
votes
0answers
22 views

Why none of xmlrpc filters work

I disabled all of the plugins and used fresh install of wordpress but it seems none of xmlrpc filters works for me... . for example add_filter( 'xmlrpc_wp_insert_post_data', 'ffff' ); //or ...
0
votes
0answers
34 views

I can get the permalink or the excerpt to work correctly, but not both

I'm calling the following code from within a filter hook. (I'm using the_ rather than get_the for bugsquashing clarity.) function test_function($output, $format, $link, $post, $adjacent) { ...
0
votes
0answers
24 views

Filtering by custom fields select?

I have a custom template listing all the posts under a category x. This is how my current loop looks like: <?php query_posts('cat=522'); while (have_posts()) : the_post();?> All the ...
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
66 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
72 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
26 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
32 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
47 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
203 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
38 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
60 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
57 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
71 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
61 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 ...