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

learn more… | top users | synonyms (5)

2
votes
2answers
2k views

What params are available with the_content filter?

I am looking for what params are passed to my filter function. Where can I find such info in the codex? http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content didn't provide much info I ...
2
votes
1answer
1k views

hooks & filters and variables

I was updating the codex page example for action hooks, while playing around to get some reuseable functions done (originally for some Q over here @WA). But then i ran into a problem i wasn't aware of ...
1
vote
3answers
824 views

Possible to filter the posts or categories that XML-RPC users see in their mobile application?

Is it possible to filter the posts or categories that XML-RPC users see in their mobile application? I have a plugin that hooks into pre_get_posts and list_terms_exclusions to do what I need it to ...
1
vote
1answer
2k views

Using 'posts_where' on a query with a custom field

I have a page which displays tour dates for an artist. I use a custom field (TheDate) to give each entry a numerical value so that they will show up in the proper order (regardless of when they were ...
3
votes
3answers
2k views

Loading template files from a subfolder in my theme?

I am working on a site that will have up to 30 templates in it. I don't want to have all those templates at the root of my theme folder cluttering up everything. I know how I can modify the ...
2
votes
1answer
484 views

PHP5, Inheritance, Singleton - action & filter hook limitations

I'm currently working on a plugin, which uses the builtin cron functionality of wordpress. Instead of using PHP4, I want to use PHP5 with inheritance and the singleton design pattern. I run in some ...
2
votes
2answers
4k views

Filter the URL of next_posts_link & previous_posts_link

I am working with the qTranslate plugin to create a multi-lingual website. The plugin does a great job of translation except for on the next_posts_link & previous_posts_link template tags. When ...
4
votes
5answers
702 views

Implementing advanced add_* function wrappers

add_action() and add_filter() are major functions. However in some scenarios add one more function and hook it somewhere approach gets bulky and inconvenient. I had determined for myself several use ...
2
votes
1answer
404 views

There's some way to add a wrapper around posted images?

I need to add a wrapper (I'll use <figure> in my example) around images posted through the editor, with a variable depending on the size image is being posted (thumbnail, medium, large, full), ...
1
vote
2answers
10k views

how to display post content without post image?

i've implemented a jQuery gallery for displaying several images within a post. the problem is that the_content(); also displays the post image. any ideas how to filter it? thanks
2
votes
3answers
1k views

Add parent template name to body class filter when visiting subpage or single post

how would I go about creating a filter for the body_class() tag that allows me to add the the parent pages slug name as a class to the body whenever visiting a subpage or post?
1
vote
3answers
5k views

add_filter to post-gallery and remove all <br>'s?

hey guys, i really need your help. Whenever I use a gallery in wordpress and set it's columns to just 1 Wordpress automatically adds <br style="clear: both"/> after every <dl ...
4
votes
2answers
2k views

How to add a filter to all widget output

Is there one last filter that is ran over the widgets before they are sent out to the browser? I would like to add a filter that adds rel="nofollow" to all links in all widgets. For instance, I can ...
0
votes
2answers
795 views

Filter or order based on custom field

I have added a custom field to some posts called 'frontpagerank' The plan is to order the posts by this value but first I just want to filter out any that don't use a front page rank. I have achieved ...
1
vote
1answer
3k views

Add Custom Filter to Admin User list

What is the correct way to add a custom filter (a dropdown box in this case) to the admin user list (wp-admin/users.php)? There are no filters or actions that I see to hook into that would allow me ...
0
votes
1answer
1k views

recent comments filter by author, page, category

is there any way to display recent comments in a widget area only for one page? = Comments that are belongs to one page. comments of one category but not from admin ( or some other user ) I want ...
4
votes
3answers
9k views

Filter by one custom field, order by another?

I have a custom post type "Listing" and I want to get all Listings that have a custom field gateway_value != 'Yes', and order the results by another custom field, location_level1_value. I can get the ...
1
vote
2answers
3k views

How do I filter title and alt attributes in the gallery shortcode?

I am displaying a post gallery inside a custom post type, using the following in my single-custom.php template: <?php echo do_shortcode('[gallery id="'.$post->ID.'" link="file" columns="5" ...
0
votes
1answer
207 views

Can I attach a plugin via my add_filter callback contents?

I'm trying to add my plugin interface to the Category Editor. I've easily attached it to the post and page editor using the add_meta_box() filter, but there does not appear to be an add_meta_box hook ...
0
votes
2answers
851 views

How to Prevent Wordpress to encode html in post?

As as title, how to prevent wp not to encode html in a post? currently i just need to prevent '&' changed to &amp; The result need to be looks like on editor with html tab mode selected. ...
1
vote
3answers
6k views

Not able to change wp_title using add_filter

I have a custom page where I try to change the page title. The function executes, but the title is not changed. This is the code I'm using: add_filter('wp_title', set_page_title($brand)); ...
0
votes
1answer
746 views

Exclude posts without category from loop

I'm trying to exclude all the posts that doesn't have a category assigned to from the main loop, i searched everywhere and i found a billion ways to exclude some categories or filter from specific ...
1
vote
2answers
95 views

Categorising posts/pages into years published

I have a lot of posts/pages, and I would like to create a list in my sidebar, showing all of the years that I have created posts/pages in, so for instance, if I have 5 posts/pages that were spaced out ...
0
votes
1answer
612 views

Drop-down filter doesn't retrieve custom taxonomies

Wordpress 3.0.4: Wordpress 3.1 RC4: functions.php (The last part is the one involved in filtering and displaying the drop-down menu): <?php /** * Create the Page Content custom post type ...
2
votes
3answers
1k views

How do I filter the excerpt metabox description in admin?

I want to change the default "Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts." help text below the Excerpt input area to ...
0
votes
1answer
1k views

Creating a drop-down and filter button for two custom taxonomies assigned to a custom post type

I'm using the following code to create drop-down menu and filter button for two custom taxonomies assigned to a custom post type called Page Content (full previous code here): function ...
1
vote
2answers
597 views

How to detect filter in URL in Category page?

I need to add an additional filter based on a category for posts that have a custom post_type. For example, I have a page located at /category/tasks that lists all tasks. I need to make it so I can ...
1
vote
2answers
4k views

Custom Post Row Actions

I came across this question while writing this question. I have one question that extends upon that question. I figured out that you use the get_delete_post_link filter to create a new url for my ...
1
vote
1answer
113 views

Filter custom posts with / without comments

I need to display (for pages that use a particular page template) a list of custom post type objects filtered into 2 sets - those with comments, and those without comments. Each of these sets should ...
-1
votes
4answers
13k views

Is there any multiple filter/criteria plugin for wordpress? [closed]

I'm interested in a wordpress plug-in that is able to make from tags or categories multiple search criteria like left hand side of the following site system http://www.olx.com/dvd-cat-238 When one of ...
1
vote
1answer
878 views

add_filter multiple times with different addon functions?

I'm adding this filter when the condition is true. Can I add another function on the same filter when the 2nd condition is true or will the last one cancel out the previous one? ...
3
votes
3answers
3k views

I'm using a filter to remove the <p> tags auto wrap, but there still wrapped elements?

I have this in my functions.php: The images inside the slider were added as custom post types called "Page Content." I'm not sure if the filter only applies to the main Posts. /** * Remove ...
1
vote
1answer
1k views

Title_save_pre - Simple problem that u know for sure

I have two custom post type. Then I need to use title_save_pre to post title prior to saving it in the database. I need to use this filter just for one custom post type. This is my function: ...
0
votes
1answer
3k views

Overriding default calendar to show posts from a category

I'm trying to modify the default WP calendar (get_calendar()) so that it shows posts from a specific category and then use that as a shortcode. Here's what I've done: Copied across the ...
2
votes
1answer
1k views

Allowing non-latin characters in registration

I am from Turkey and we have "şŞçÇğĞüÜöÖıİ" characters in our alphabet. I want to use those characters in permalinks/slugs/usernames. I found temporary solution for permalinks/slugs with ...
1
vote
2answers
773 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
591 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
472 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
709 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
2k 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
489 views

When does wordpress process &lt;!--nextpage--&gt;

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
313 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
9k 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 ...
4
votes
2answers
10k 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 ...
24
votes
4answers
16k 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
315 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
707 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
510 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" ...