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

learn more… | top users | synonyms (5)

1
vote
2answers
730 views

Help with issues on “Adding a Taxonomy Filter to Admin List for a Custom Post Type?”

This question relates to a solution found here from user somatic and mikeSchinkel I am testing somatic's solution, and it loads and populates the dropdown with no issues, but When you click filter, ...
0
votes
2answers
542 views

Change tags url to search different site

** UPDATED BELOW ** Original Question: Anyone know how to create a function that changes the url of the_tags so that when one is clicked on, the function searches another domain? ** UPDATE ** IT ...
1
vote
1answer
460 views

Event Calendar using insert_post_data after save_post and insert_post after post_transition draft_to_schedule

OK, I'm taking on the dreaded task of developing an event calendar for my site and have gotten a bit stuck. I'm open to any and all ideas but here's what I'm doing and what I'd like to do. I'm ...
2
votes
2answers
614 views

How to remove commenters ability to add hyperlinks to comments?

I'd like to be able to filter out a commenters ability to add hyperlinks in their comment text. I removed the "websites" field from the mix to reduce the amount of spammage already (see: Removing ...
2
votes
1answer
1k views

Explanation of the “posts_join” and “posts_fields” filter hooks?

I'm new to the "posts_" filter hooks and wanted to know a few things from those in the know: In this question, someone posted an answer using posts_join that took a second parameter of $query: ...
1
vote
2answers
447 views

When does wordpress process <!--nextpage-->

when does <!--nextpage--> get processed by wordpress filtering. i am adding multiple paged posts in post content on the content_save_pre and this is good for rendering my shortcodes, but ...
0
votes
1answer
3k views

Sorting/Filter posts from front-end in Wordpress blog

Here is the design I have mocked up http://enormo.us/clients/ischool/ The question is, how can I create a filtering system where the main blog area acts as the central feed and it combines the ...
0
votes
1answer
309 views

How to move featured image to the top of the list?

I have been working on using featured image to create a list of items on the right column here: http://www.julianamaeberger.com/soma/news/ The current featured image is now being given a class of ...
1
vote
3answers
8k views

Remove title attribute from images

I'm looking for a way to remove the title attribute from images, preferably through using a hook or a filter. Most clients don't bother giving images a proper title, thus eliminating the purpose of ...
3
votes
1answer
1k views

Is it possible to use a forgot password url filter?

i recently found that a login url filter is available but i can't find a solution for the forgot password as well, for the login url i use this: function custom_login_url($login_url) { return ...
3
votes
2answers
8k views

Filter WP_Query for posts having a certain meta-value

How to filter WP_Query for posts having a certain meta-value, without using a Custom Select Query? I have a custom posttype with meta-key: "open", and meta-value options: "yes" or "no". I would like ...
23
votes
4answers
13k views

Filter to remove image dimension attributes?

I'm working on a site based on a fluid width css template which sets a max-width on images to the width of the column containing them, and I need to remove the inline width and height dimension ...
1
vote
2answers
307 views

How to track post number on the_loop

I have a need to customize some posts from the loop. Here's the deal: My site is set to 10 posts per page. On post #2,#5, #7 (on every page), I want to display specific background. What's the best ...
1
vote
1answer
685 views

Custom wp_query time filter on meta_value

My goal is to only show posts with opening hours after business hours, for a given day. So, e.g. I have a (custom) post with following meta_key and meta_value: meta_key = 'monday, meta_value = '14:00 ...
0
votes
1answer
467 views

How to show a featured image as current?

On the right rail here: http://www.julianamaeberger.com/soma/sample-testimonial-3/ I am showing a random post "Testimonial". Below that I am showing all featured images for the category "Testimonial" ...
1
vote
2answers
525 views

add_filter return value

function validate_username( $username ) { $sanitized = sanitize_user( $username, true ); $valid = ( $sanitized == $username ); return apply_filters( 'validate_username', $valid, $username ...
0
votes
2answers
367 views

Check if variable is set in filter

Thanks to your suggestions, I enabled wp_debug and discovered flaws with my plugin. I have a filter for sorting posts by votes. I use it when the sort URL parameter is on. add_filter( 'posts_where', ...
2
votes
8answers
9k views

Filter get_categories() for taxonomy term in WordPress

I want to show a category only if a (custom) post is in that category AND region = $name for that post. So, e.g. I have a custom post (type "business") named "Mamma Mia" in child-category: ...
1
vote
1answer
815 views

add_query_arg not working

I added a filter to append a parameter onto the URL when navigating in categories. This is used to sort posts by their votes when browsing a category only if a sort parameter is set. For instance ...
0
votes
4answers
1k views

Why doesn't remove_action work in my plugin?

Using a WordPress multisite network with Buddypress. In order to modify the top nav bar, I've written a function to replace part of the menu. Calling it thus: add_action('bp_adminbar_menus', ...
1
vote
2answers
1k views

Conditional add_filter?

I need to apply an add_filter from my functions.php but only if the user has opened media-upload.php from my custom function. Is it possible to send a variable when opening media-upload.php that I ...
2
votes
1answer
759 views

Can I add custom meta for each image uploaded via media-upload.php?

I'm calling media-upload.php via a custom icon click inside the content editor and I would like to add a custom meta value for all images that are uploaded when the media-upload.php is called from my ...
2
votes
1answer
2k views

Best way to filter featured image text for a custom post type?

I am trying to change the "Set featured image", "Remove featured image", and "Use as featured image" text links of a custom post type for my plugin Meteor Slides. I found the ...
3
votes
2answers
1k views

Archive sorting functions by custom fields (front-end)

I want to give the users the ability to sort the posts in the archive by some custom fields that I pre-define. The end result would be en a tabbed container, and the user will click on the relevant ...
1
vote
2answers
809 views

How to apply content filter permanently?

I have the following temporary filter to fix a content error. We have data in our posts that have 4 digit zip codes, because the leading zero was cut when the original file was created. (For instance, ...
1
vote
2answers
363 views

Generating a Rewrite Rule for sSecific Post-Requests from a Submitted Form?

I have a form ( method post ) which makes it possible to filter my posts by specific criterias e.g. "Most Recent", "This week", "Last week", ... It works fine but of course the URL is the same for ...
1
vote
2answers
990 views

How to make <!--more--> a button?

There is plenty of information on how to make the Read More function display different text in the Codex but what kind of filter would need to be used to make it display <button class="readmorebtn" ...
0
votes
1answer
290 views

Edit post image attributes on fly?

Greetings, We can edit image attributes with this get_image_tag filter when we are adding images or with regex and filter the_content,but is there any similar filter or action that can we use to edit ...
2
votes
3answers
4k views

How to set custom cookies before output

What's a surefire way to check/set cookies before the php headers are sent? Is there an action or filter that would be the best place to hook a setcookie() function?
3
votes
2answers
1k views

At what priority does add_filter overwrite core functions?

I'm writing a plugin that adds some extra thumbnails, checkboxes, etc to the end of a post. I'm trying to figure out how to use add_filter properly. Basically, I've got add_filter('the_content', ...
0
votes
4answers
2k views

How to filter post from categories only if the posts appears in one of them, not the other?

The scenario is, some posts have one category, ok. Some others have more than one category. I must create post with content and also slideshow thumbnails for use with Nivo plugin gallery. Ok. I want ...
1
vote
1answer
598 views

How to order posts by one custom field and filter them by another one?

In my WordPress blog I have events I want to order and filter by custom fields. The order should be done by the custom field "event_date_end" which means that every event that is still running should ...
11
votes
1answer
5k views

Saving Taxonomy Terms

I have an interesting problem which I hope someone can quickly answer. I have created my own metabox which, based on "MY METABOX CODE" (list below) is correctly displaying a dropdown list of all my ...
0
votes
1answer
759 views

How to display a shortcode caption somewhere other than the_content

I want to disable shortcode captions for posts in one of my themes, and display the content elsewhere, such as in a sidebar. The images aren't uploaded to wordpress, but they're linked-to using the ...
2
votes
2answers
764 views

When does remove_filter not work?

There are reports that remove_filter does not work under some circumstances, and that we should provide alternatives. However, the article does not really make it clear under which circumstances this ...
2
votes
2answers
395 views

Is This A Correct Example Usage Of current_filter()?

Is this a good example of usage of current_filter()? <?php add_filter("_my_filter", "common_function"); add_filter("_another_filter", "common_function"); function common_function(){ ...
11
votes
2answers
4k views

Difference Between Filter and Action Hooks?

I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a ...
2
votes
4answers
2k views

How can I filter Microsoft Word gunk from pasted content?

I have some users who are posting to a group blog and are able to cut-and-paste but their pastes include things like: <!– /* Font Definitions */ @font-face {font-family:”Cambria Math”; panose-1:2 ...
1
vote
2answers
99 views

Can plugins that filter post contents work on posts from Word 2007?

I am testing blogging from Word 2007, so we can support users who wish to do so. Everything works fine, and as expected except the plugins that we use that add filters to the_content (eg ...
1
vote
2answers
87 views

Modifying the comments section through a plugin regardless of theme

I need to be able to add some data (text/images) to each comment in the comments section through a plugin. What I'm trying to do is actually very similar to the way the stack exchange sites have their ...