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

learn more… | top users | synonyms (5)

0
votes
1answer
17 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
23 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
83 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
174 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
28 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
49 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
125 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
106 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
39 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
38 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
67 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
67 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. ...
0
votes
1answer
53 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
51 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
38 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
46 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
32 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
31 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
90 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
28 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
68 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 ...
7
votes
2answers
1k 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
43 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
44 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
24 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
17 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 ...
7
votes
2answers
136 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
173 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
45 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
64 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
63 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
189 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
150 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
91 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
35 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
139 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
88 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
41 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
59 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: ...
0
votes
1answer
58 views

Change Custom Post Type singular_name through function/filter

I'm working on e-commerce site using woocommerce plugin. My client will be selling tickets online. woocommerce plugin creates custom post type "Product". I want to change this cpt singular_name to ...
0
votes
2answers
49 views

Problem with shortcodes in external file

I have simple post with a shortcode: [xx]http://harrix.org/1.txt[xx] And an external file which has the content containing a WordPress shortcode: [strong] g[/strong] I try add my own tag to load ...
1
vote
1answer
41 views

post_row_actions filter is not working while update post using quick edit

I have created two links using post_row_actions, it was displaying fine when page loads. But the links will get disappear after update post using quick-edit. Is it a bug from WordPress or did I miss ...
0
votes
3answers
107 views

How to list the Hooks and order of execution in current loading page?

I need to know the list of hooks that are called in the current page . How to identify the priority assigned to the action and filters in the action . If i want to remove the default action on ...
0
votes
1answer
50 views

Allow tags and attributes in post and pages content

I am trying to allow the "onclick" attribute on links as well as some html tags such as iframe to the content displayed in posts and pages. In my theme's functions.php file, I tried removing ...
-1
votes
1answer
263 views

Hueman layout styles and custom post type (DW Q&A)

I'm running a wp site with the Hueman Theme and the Q&A plugin from DW. The theme doesn't really plays well with the theme, so I had to find some solution for it. Managing the is somewhat painful ...
0
votes
0answers
138 views

custom gallery filter with image caption as link title?

I use a custom gallery function to alter the normal Wordpress markup. Usually it's fine but I can't quite figure out how to add the image caption as a TITLE attribute on the thumbnail link. (The ...
0
votes
1answer
83 views

Wordpress URL rewrite problem

blog.com/product/somename In the above URL - how do I tell Wordpress that 'product' is a variable and 'somename' is its value. Then how do I extract that value and use it inside a function I'll ...
1
vote
1answer
52 views

Automatically set default password to all posts in a specific category

Let's say that we have a category with slug protected_category and some posts in it. Is there a way to force all posts in that category to be password protected using a default password? UPDATE: I ...
0
votes
1answer
21 views

search form leads to 404

I'm using the follow code in my functions.php to add a search box to my primary nav menu - add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( ...
0
votes
1answer
26 views

How to remove shortcode(s) from WYSIWYG Page editor for Non Admins

Title says it all. We have a front end form on our site where users submit content via front end (also they are logged in while doing this) Because these short codes add them self to the content box ...