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

learn more… | top users | synonyms (5)

3
votes
0answers
6 views

How to auto-translate custom user roles?

I developed a small plugin that adds (or to be more precise: first deletes then adds again) some custom user roles. Each of these roles is set up in a way like this: function ...
1
vote
1answer
31 views

Restrict filter to run only inside specific function

I would like to filter get_terms(), but I only want to filter get_terms() when it is called from the wp_terms_checklist() function. I am looking to add a "No term" option to the end of my checklist ...
2
votes
1answer
21 views

Are there Limitations on filter handles?

I was looking through a 3rd party plugin's code today and found them doing this: add_filter('some_base_handle'.sanitize_title($string), ...) Curious, since I was using xh_prof to look for code that ...
0
votes
1answer
24 views

Adding body class when post contains a specific shortcode

Simple shortcode function : function my_shortcode_function($atts,$content=null){ // Do something return $content; } add_shortcode('my_shortcode','my_shortcode_function'); I wonder how to add ...
0
votes
0answers
11 views

function triggered by “manage_users_custom_column” filter not working

I am trying to add a custom column un users.php but it stays empty. I have successfully added a column to the users admin page with this code in my theme's functions.php file: function ...
1
vote
1answer
14 views

Is it possible to add a filter for the output of nav-menu items in admin?

I want to remove certain input fields on the admin screen for nav-menus for specific menu positions. I've used filters to filter front-end output but not for admin output. Is there a filter available ...
1
vote
0answers
18 views

Categories filtering in new post

I have a website with post types that have subtitles for movies. That files are on a specific custom post type using http://www.wpdownloadmanager.com/ pro. Because all custom type posts are movies ...
0
votes
1answer
16 views

Redirect after post deleted

On the single template, I am using a delete post link generated by the get_delete_post_link function. When I use the link to delete the post I am currently on, it adds a query string of ...
0
votes
0answers
12 views

Filter terms bases on multiple taxonomies - operator not in? [duplicate]

Building a function for filtered taxonomies. How to use 'operator' => 'NOT IN' or 'operator' => 'IN' inside the query to only show tax_query terms that are connected to all taxonomies instead of ...
0
votes
1answer
30 views

relation OR instead of AND - Filtered term ID's in loop

Question not related anymore.. First I tought about the relation OR/ AND for results, but I believe I should work with 'operator' => 'NOT IN'. I would like to query the results that meet multiple ...
0
votes
1answer
15 views

Filter the HTML content of plugin

I am using the Marketpress plugin. I want to modify single_order_funct() function HTML content in it. I want to make changes so that, when it is updated, I don't lose them. class PluginClass{ ...
3
votes
1answer
16 views

Change text of Description in Image Library

i would like to change or add text to the Media Library Overlay on the right side if you click on an image and can enter a description for the image. At the moment there stands "Description" or ...
0
votes
3answers
21 views

Pass widget variable to external function

I am working on a custom widget which displays posts from a selected taxonomy (category or tag). This widget contains a textbox which the user enters an ID of a taxonomy (category or tag) to exclude ...
0
votes
1answer
22 views

apply_filters('the_content') - make it ignore shortcodes?

I am using apply_filters('the_content) so I can see properly formatted content inside my wp editor in the backend. However, this also renders the shortcode that's in the content. I want it to ...
1
vote
0answers
13 views

Formatting get_post content doesn't allow JS content to function properly

I am currently pulling in the latest post on a category page based on which category you click on. When you click on the category "Code Examples" you see this: I am using the Crayon syntax ...
0
votes
0answers
28 views

apply_filters to content but ignore shortcodes

I want to prepare my content added via wp editor so it displays nicely, so I use apply_filters like so: $ld = apply_filters('the_content', $ld); That works fine for the page, but in the backend ...
2
votes
2answers
31 views

Remove WPML's home_url filter

The WPML plugin filter's home_url in order to provide a link to the home page specific to the language you are viewing. (So if you are reading a Spanish page home_url() will point you to ...
1
vote
2answers
58 views

add_filter('the_content', '…') stops pagination from working

I have a function (it deals with using preg_replace_callbackto replace Image URLs with URLs/paths to the uploads directory - lets call it replaceImgUrls()) which is then passed into ...
0
votes
1answer
30 views

Hook only specific post type

with this function I change the title of my posts in the posts type 'alternatives'. My problem is that Wordpress changes all my titles now. Does anyone know how I can set this for the specific custom ...
0
votes
1answer
20 views

Change the template when the user is not logged in using page_template filter (it does not work)

I want to print other template when the user is not logged in. I use this code: function restrict_access_to_unlogged_users($template) { global $post, $pagename; $new_template = ...
1
vote
1answer
36 views

Why won't my preg_replace work with content_save_pre?

I've written a filter function to replace all image URLs in a post with URL from the Uploads directory of my site. However, when using the content_save_pre, filter it won't actually work - but if I ...
1
vote
1answer
22 views

What to use instead of the content_save_pre filter?

I read on Adam Brown's website that the content_save_pre filter is depreciated as of WordPress 3.8 - is this true? It doesn't say it on the official codex page for content_save_pre so I'm skeptical. ...
-1
votes
0answers
19 views

How can I manipulate the HTML of the_content in a specific way?

I know the basics of how to add a filter to modify the_content, but I want to modify the HTML in detail. Specifically, I want to find any <blockquote> elements and add some HTML within them. ...
0
votes
1answer
26 views

the_posts filter been called multiple time

I have create an endpoint so I can do some checkout processing of my cart. Everything is working fine in sense that every thing is hooked up properly. Though I am having issue that to serve the ...
0
votes
1answer
18 views

Add filter multiple times using only one master function

Is it possible to use add_filter with lets say an array of different values? to achieve something like the following: foreach($templates as $name) { add_filter( 'single_template', function ( ...
0
votes
1answer
18 views

Can't order the query result as given posts id's array

I want to order a query result by the same order as the post id's array given. E.g. I have: $arrayPostsIds = array(30,5,17,10); and I want to get the posts in that order. So after trying this: ...
1
vote
1answer
30 views

Taxonomy Custom Column - 'manage_{TAXONOMY}_custom_column' filter only passing 2 arguments

I am trying to add a custom column to the tables shown on the Tags & Categories admin pages in Wordpress. I have created a function, and added it as a filter using add_filter( ...
0
votes
1answer
15 views

Custom registration field to SQL database

I have created new columns in a SQL table called wp_users. Those fields are "giodo", "handel" and "regulamin". What I want to do is to add '1' to each column when a user registers and selects ...
0
votes
0answers
25 views

Wordpress Custom Post Type Filter not Working

I am pretty new to Wordpress and I have a problem with a filter in custom Post types.. See screenshot here of what I mean: Here is the code I am using for the filter public function ...
1
vote
1answer
44 views

Debugging - trying to add search box to menus

I have already asked a similar question at stackoverflow (http://stackoverflow.com/questions/22492292/add-filter-in-wordpress-how-do-i-know-if-it-is-run), but maybe that was the wrong place? As you ...
0
votes
0answers
23 views

What is the default template for a category/taxonomy query?

I am trying to figure out what would be the default template used for this URL: http://example.com/categories/16/search_type/and/order/default/ It does not appear to be the category.php or ...
0
votes
1answer
43 views

Use of apply_filter in plugin/widget class

I'm having difficulties to find out what I'm doing wrong in my use of apply_filter() in a widget class. Here's some samples of my code: class Byad_CountDown_Widget extends WP_Widget { function ...
3
votes
1answer
182 views

WordPress 3.9 - Trouble Editing new TinyMCE

With WordPress 3.9 coming soon it's bringing along TinyMCE 4.0. I'm running my plugins and functions through some testing and found that one of my functions seems broken / not working with the new ...
0
votes
0answers
26 views

Custom URL in Wordpress with add_rewrite_rules and add_rewrite_endpoints

I have the following URL for a filter functionality that i try to build in wordpress: example.com/offers-type-all-inclusive-from-germany-transportation-airplane.html How can I make the arguments ...
0
votes
1answer
22 views

Strip $before & $after strings from a page title

So I have plugin that pulls remote data (real estate listings) into a wordpress site. I have been asked by a client to allow the page title for each listing to be set based upon that information and ...
0
votes
0answers
15 views

How to filter the form title and/or heading in GravityForms

I know that you can filter individual fields, but does GravityForms have a filter for the form container? I am trying to customize the HTML of the elements that occur after the form opening tag, and ...
0
votes
1answer
13 views

Activate short codes for all post queries?

I need to use shortcodes on widgets and various plugins. For widgets I simply used: add_filter('widget_title', 'do_shortcode'); add_filter('widget_text', 'do_shortcode'); However I cannot figure ...
5
votes
2answers
62 views

Remove Actions/Filters added via Anonymous Functions

That's a freaking bad practice I must say. Spent last two hours finding a solution to remove actions and filters added via Anonymous functions. This is the code used on a Parent Theme, and I need ...
0
votes
1answer
61 views

How to add custom content under plugin row in WordPress admin plugin list?

I'm looking to add a custom message under my plugin in the "Plugins" page, much like the following screenshot: What action or filter should I use? Thank you!
0
votes
1answer
27 views

change output location of plugin function using a custom hook

I'm running the YouTube Video Fetcher plugin and it fetches youtube videos and displays it on your website. However, instead of displaying the video after the post, I want to hook the code into a ...
0
votes
1answer
32 views

filter single_cat_title avoiding the breadcrumbs

I'm developing a simple plug in and I need to filter single_cat_title in category page adding some html in every category page. Just doing this: function subtitleCategory ($title) { return ...
0
votes
0answers
23 views

Multiple taxonomy drill down filter on a collection of posts

I would like to add a drill down filter to a product catalog site with one main taxonomy, and three taxonomies that serve as additional filter for the main product category. The main plan is to build ...
0
votes
0answers
100 views

Loop the posts between two dates selected using jquery datepicker

I went through this link where we can restrict the loop to display the posts only between two dates and it works fine. But if I have a Jquery Datepicker with from and to date, then how can I pass ...
0
votes
0answers
60 views

Jquery/Ajax+taxonomy filter?

I need to create a filter it doesn't really matter wether it's JS/Jquery or Ajax I just think Jquery/Js would be easiest. Either way this is my situation. I have a few custom taxonomies and custom ...
1
vote
2answers
36 views

How to filter backend post list showing only posts having a shortcode

I need to filter the Posts and Pages tables in the Admin panel by certain shortcodes. In my plugin, I have added a column for shortcodes to the Posts and Pages views that works like the "Categories" ...
0
votes
0answers
19 views

Using Apply Filters in the-bootstrap parent theme

In the-bootstrap parent theme there is the following function: function the_bootstrap_custom_background_setup() { $args = apply_filters( 'the_bootstrap_custom_background_args', array( ...
1
vote
1answer
45 views

Filter out some plugin action in wp head / wp_footer

I am using a plugin called "syntaxhighlighter". I know not to ask for plugin specific questions but rather how to filter out action added to the wp_head / wp_footer conditionally... This is a ...
0
votes
0answers
43 views

Populate WYSIWYG field with ACF choice

So, I have a custom post type that uses a flexible content field containing a post object field and a wysiwyg field. The post object is to choose a post from a selected post type. After you choose ...
0
votes
1answer
20 views

Save something to global var in add_filter

I am here again with a strange question. First, I'm using ACF plugin for adding cistom fields. My code looks somethink like that: global $testMe; $testMe = 0; function my_acf_update_value( $value, ...
0
votes
1answer
25 views

Add Element as a Filter to the_content

Can I and How would I add a filter in the function.php that would add a HTML element around the content when the_content is used? This would be similar to what you can do with the_title. i.e: ...