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

learn more… | top users | synonyms (5)

0
votes
0answers
18 views

Change core metaboxes labels [duplicate]

I am creating the oh-so-common Events custom post type and I want to use the published date as my event date. Eventually, in my archive, I will make sure to display posts with the scheduled status. I ...
0
votes
1answer
63 views

How to hook into action/filter call

I'm about to create a very simple logging plugin. Every time an action or filter is fired I need to log it to the file. The idea is that we will be able to see exactly which actions and filters are ...
1
vote
0answers
81 views

Filter pre_get_posts does not modify Mine/All/Pending

Maybe I need to use a different filter, but I am using the pre_get_posts filter to filter out posts on a custom post list view. It works for the main table, but the quicklinks to (All) (Published) ...
0
votes
1answer
162 views

Filter Posts by current Month

Ok, I have a client that wants to only display posts by the current month. I've tried a few different variations but none have worked. Here's where I'm at now. Any help is appreciated! ...
0
votes
2answers
440 views

Custom Login Errors and variables I can use

I need to change this error message from including the username to the users email address. I've checked this question and answer out and it helped, but didn't go far enough for me. Change login ...
0
votes
0answers
70 views

How to display list of categories when using multi category filter

I'm using a multiple category filter by linking to URLs such as: domain.com/category/reviews+books domain.com/category/reviews+art etc This works fine as a filter but I can't find any built in ...
0
votes
1answer
74 views

How to set default values for edit_post_link() in my theme?

How do I set default values for the edit_post_link function in my theme? I'd like to change the 'Edit This' string to a custom value, but specify this only once, so I can use instead of everywhere. ...
0
votes
1answer
236 views

Using add_filter() in Widgets

Just have a query reference the add_filter() function. Can you use this function inside a WordPress widget class. Example I have a widget with dynamic created code that I want to pass to another ...
1
vote
0answers
54 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
0
votes
0answers
124 views

Customize register form page with add_action or apply_filter

I am studying "action and filter" and confused. I have a theme and I need to add "phone number1, phone number2" on register form page. I have been trying to file apply filter or add action on the ...
0
votes
2answers
160 views

Filtering WP_Query

I'm developing a site that uses a Artist custom post type and I need to query all posts of this type in a page template. I need to set the is_post_type_archive property to true too to filter this ...
0
votes
1answer
91 views

filter on the_content stopped working when I updated to WP 3.6.1

I created a filter to add a pin button on to my blog posts' images, which after much playing worked. Then, a few weeks later, I updated to 3.6.1, and the filter stopped working. Did something change ...
0
votes
1answer
131 views

Detecting Embed URLs Within post_content

I need to change the way WP outputs html when given an embed URL within the content. Example content within the WP editor: This is standard content and will be wrapped in a 'p' tag. But check out ...
0
votes
2answers
690 views

Replace Paid Shipping Method With Free Shipping Method WooCommerce [duplicate]

If I have a store that offers flat rate shipping of $10 and free shipping for orders over $100 and a customer orders over $100 it doesn't make much sense for them to have to see both free shipping and ...
0
votes
0answers
52 views

Show post when both categories are present but not one of them

I'm having issue filtering posts by category. There is the A category for posts (which is the default and also applies when no category has been set explicitly) and B category with subcategories for ...
0
votes
1answer
22 views

Right way for setting categories

My site follows this hierarchy HTML5 + Themes Resources Books Tools Wordpress + Plugins Themes Tools Books jQuery + Plugins Tools books and the same combinations for CSS3, SEO and others, ...
0
votes
1answer
326 views

Custom Taxonomy Filter Issues

I have a custom post type with a few custom taxonomies and I am using a piece of code to filter the posts based on the taxonomy on the main edit page using drop-down menus, which works great, but I ...
1
vote
1answer
185 views

Contact Form 7 filter similar to preprocess_comment

Does the Contact Form 7 plugin have a filter similar to WordPress's preprocess_comment? I'll be using this filter to check the body of the message for certain words and call wp_die() to display a ...
0
votes
1answer
79 views

How to use in_category?

There's this "Recent Posts" widget, that should output only posts in category 'News' (ID 26) So I tried this: <?php $t =& peTheme(); ?> <?php $content =& $t->content; ?> ...
0
votes
0answers
51 views

Query Database and Return the result in translated pages

I am having a problem for a while now and I can´t seem to solve it on my own. I have made a website, this website is multilingual and it was made in wordpress. In my "photo album" page when I sort ...
0
votes
0answers
40 views

get_the_excerpt on mobile still displays continue reading

I'm writing a plugin where I'm using the excerpt field as just another field. In order to get rid of the 'Continue Reading' Link, I'm removing all possible theme filters: add_action( ...
0
votes
1answer
115 views

Which filter affects the 'entry-title' post class

I created a plugin setting a $var to true if the post belongs to category 'a', and set the same $var to false if the post belongs to category 'b', it works and I can get the correct value depends on ...
0
votes
2answers
240 views

Add Filter not working with get_posts

While tweaking the "Bryans Childpage Thumbnail Generator" plugin, I am applying filter (with pagination) to the get_posts for WP Pages (post_type=page), but its not filtering at all. Here is the code: ...
0
votes
1answer
45 views

changing variable through filters or action hooks

it appears i have a problem with understanding how add_action,add_filter and apply_filters work. somewhat abbreviated, i have the following scenario: in a template file i have this while ( ...
0
votes
0answers
140 views

How to reset/remove added filters 'posts_join' and 'posts_orderby' after the loop is completed?

I am sorting results appear on the category archive page using these filters: posts_join and posts_orderby. There is a widget, which displays recent posts. I am using default recent posts widget of ...
0
votes
1answer
51 views

How to disable thumbnail filter for a specific template part or image size?

I am filtering post_thumbnail_html in my theme to modify the output of my image tags. I have one template part that I would like this filter not to apply to. It uses an image-size that is used no were ...
2
votes
1answer
65 views

Making a class available via actions filters

I'm creating a plugin which displays a tabbed view. The way it currently works is when the user clicks a tab class Loader reads the $_GET parameter and creates an instance of the class specific to ...
0
votes
1answer
126 views

Help with filter for wp_notify_moderator()

I have a case where I have multiple Administrators. Not all of them want to be notified per email when there was a comment posted or is held for moderation. The Settings > Discussion page only ...
1
vote
0answers
85 views

Make WP not format code, not insert line breaks in between tags

Gahhhh! Are you kidding? Ok, I guess wp wants my source code all nice and formatted... <a href="/asdf">i'm a link</a><ul><li>list item</li></ul> becomes ...
0
votes
1answer
148 views

Can't change excerpt length and more tag

I tried to change the excerpt length and the more tag the way it is described in the codex: function custom_excerpt_length( $length ) { return 10; } add_filter( 'excerpt_length', ...
1
vote
1answer
3k views

Add class to active element and its parent in nav menu

I am using the following code in order to add a class name "active" to the current menu item: add_filter('nav_menu_css_class', 'add_active_class', 10, 2 ); function add_active_class($classes, $item) ...
1
vote
2answers
257 views

WooCommerce product search titles only

I had asked this earlier and solved it using the Relevanssi plugin, however that plugin is now breaking things so I can't use it anymore. How is something so freaking simple made so impossible by ...
0
votes
1answer
51 views

Add Protocol to Custom Menus

I've been using tel: links in Custom Menus combined with Responsive Design to add a "Call Now" button to my themes for smartphones. It's been working well. A client just asked me to also add a "Send ...
0
votes
2answers
172 views

How to Wrote Simple Calculations by Using Custom Fields in Loop?

I am building a website with whole bunch of custom fields and need to implement several custom fields that will auto calculate values by using values from other custom fields. All files which I need ...
1
vote
3answers
427 views

Filter specific shortcode output?

Is there a hook in WordPress that I can use to filter the output of a specific shortcode? Something like this: add_filter('shortcode_output', 'my_filter_function', 2); function my_filter_function ( ...
0
votes
1answer
218 views

Using wp_handle_upload() to direct specific path by using $overrides

How do you use wp_handle_upload function and apply_filter together to upload files on a specific path? What is going to be the override? For example: $overrides = array('file' => ...
0
votes
1answer
42 views

How would I use a filter to remove header banner on certain post types

I am using a child theme of twenty-twelve, and want to remove the huge banner image in the header for certain post types. How can I use add_filter() or add_action() to do this? I don't want to mess ...
0
votes
0answers
26 views

Filter does not modify wp_video_extensions but hard coding works?

I have a added a filter to extend the supported video extensions in WP 3.6 as follows: function dce_add_mov($args){ $args[] = 'mov'; return $args; } add_filter('wp_video_extensions', ...
0
votes
2answers
88 views

remove_action in plugin file

Im trying to use remove_action( 'admin_notices', 'woothemes_updater_notice' ); In a plugin to keep from editing the themes functions.php file however the code isnt being executed. Do i need to ...
0
votes
1answer
418 views

Strip shortcode from excerpt [duplicate]

I have this challenge, that i've found out that i'm not the only one in the WEB with the same issue, nevertheless, there are no solutions yet. I'm trying to remove shortcodes from my custom post ...
5
votes
1answer
3k views

Changing WooCommerce Display Price Based on User Role & Category

I'm looking to display a different price based on a user role (wholesaler, dealer, etc) AND based on the category. There's a dynamic pricing plugin that displays these discounts once an item is added ...
0
votes
2answers
142 views

Wrapping Featured Image on Add/Edit Page in div?

is it possible to wrap the featured image on the add/edit page in a div or other code? I don't mean on the front page of the website, but on the back end on the add/edit pages when you're typing up ...
0
votes
1answer
87 views

Add html to cpt main page / admin edit.php

I want to add some html under the title of a custom post type I created. See area in image here: http://i.stack.imgur.com/rpkV3.png I tried using different methods including post_row_actions ...
0
votes
2answers
73 views

Wrapping my head around add_filter

this is a very general question, which I have really researched. Maybe I'm just being stupid, but I can't quite get when I can use a filter. After some messing around earlier, it seems I can take any ...
0
votes
2answers
141 views

remove_filter excerpt_more from a plugin class

I'm trying to remove a filter from within my plugin class. I need to remove the 'continue reading' link from the_excerpt. The base theme is the twenty ten theme and they are applying a filter ...
0
votes
0answers
56 views

Plugin only apply pages/posts after certain date?

Is there a way to make a plugin that filters out words from posts/pages only work for posts/pages that were created after a certain date? Is there a general code one could apply to it or would it ...
0
votes
0answers
53 views

Custom post type archive doesn't react to is_archive after use of filter

I have made a custom post type with 3 taxonomies, and a filter that lets you choose a category from every taxonomy on the archive page. When I use the filter and get results, it works like you'd ...
0
votes
0answers
8 views

Is it possible to pass custom args to action/filter callback functions? [duplicate]

I am filtering the Where clause with the filter hook "posts_where" and I would like to pass a custom argument to the callback function. Because I don't know how to do that yet, I am adding the filter ...
1
vote
1answer
65 views

Check for template part, else filter content

In a plugin which brings its own post type to the table, I wish to handle post_meta by filtering the_content - unless the user has provided their own single-{post-type}.php template. Should I run ...
0
votes
1answer
101 views

How can I exclude tags from category_rss function?

I have been struggling with the following problem: The default wordpress RSS Feed includes also tags in category function. As a result, if you use a merge tag to show the post category (i.e. I am ...