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

learn more… | top users | synonyms (5)

1
vote
1answer
892 views

How to limit search to first letter of title?

I was wondering if there was a way to make the search only look for the first letter in the posts title, basically let's say my search query is www.mysite.com/?s=q I'd like to get all posts that start ...
0
votes
1answer
1k views

Filter or Hook to catch pre-rendering of post content

Is there a filter or hook that is triggered just before post content is rendered? What I'd like to do is to apply a filter to the text content of a post just before the post text is being rendered.
1
vote
1answer
529 views

What is the proper way to apply the login_form_bottom filter?

Here is my current code. function custom_login_footer() { return '<p>text text text</p>'; } add_filter('login_form_bottom', 'custom_login_footer'); I am trying to add text below the ...
0
votes
2answers
397 views

Filter “Your latest posts”

On the Reading Settings page I have clicked Your latest posts under Front page displays. I am wondering how I can filter the query that displays these posts before it gets to the loop. I have tried ...
0
votes
2answers
3k views

Filter have_posts()/ the_post()

What is the best way to filter the posts being displayed? For example in my functions.php file I want to have something like add_filter( $tag, 'filter_posts'); function filter_posts(){ ...
0
votes
1answer
352 views

How to remove the RichText Meta Box

How can I remove the rich text box editor in WordPress? I have used the remove_meta_box function specifying the boxes ID, but it does not work like it does for other core meta boxes: The code I ...
0
votes
1answer
158 views

return get_the_tag_list with whitespace removed

I need to get_the_tag_list but want to remove whitespace within individual tags. Thus, firefox, internet explorer, opera becomes firefox, internetexplorer, opera All the filters I found ...
0
votes
3answers
2k views

Ajax, filters and shortcodes

could you figure out why I'm unable to get shortcode filters applied in ajax inclusion of posts? Let me explain better: I've managed to include a post from within another post, through ...
0
votes
2answers
144 views

Alter required message using comment form api

I prefer not to use asterisk markers on required fields in the comment form. So I'd like to remove or alter the 'required fields are marked (*)' message. Being a good wordpress user, I'd like to do ...
1
vote
1answer
406 views

Taxonomy filter all children

I have a custom taxonomy filter that will filter all the pages in the selected taxonomy. I would like the code to select the pages in that taxonomy, and the children of thous pages. Heres the code. ...
4
votes
3answers
780 views

Is calling function_exists() faster or slower that apply_filters()

Is calling function_exists() faster or slower that apply_filters() ... or is the difference so small that it should not be considered? I did a bit of testing based on Kaiser's and it showed that ...
0
votes
1answer
521 views

Trying to exclude custom posts based on date, while sorting by custom field

I have a custom post type named "performance". I have a custom post query that orders posts by a custom field value (order-date). Now I want to exclude posts that have order-dates that are in the ...
7
votes
4answers
2k views

LESS CSS enqueue_style with add_filter to change rel attribute

What I'm trying to do is use less css with Wordpress. You're supposed to link to your .less files with the rel attribute set to 'stylesheet/less'. But I can't figure out how to alter the code that ...
1
vote
2answers
2k views

plugin_action_links Filter Hook Deprecated?

http://adambrown.info/p/wp_hooks/hook/plugin_action_links_%7B$plugin_file%7D Says the hook is deprecated. However, the {$prefix}plugin_action_hook_{$plugin_file} is not. I poked around the ...
1
vote
1answer
584 views

How can I filter by slug depending on language selection

I'm new to this site but looking at the quality of answers provided here I will be here for a long time :) Ok, first a bit of info: I'm developing a bilingual website (English & Japanese) using ...
2
votes
3answers
987 views

Allow unfiltered HTML in titles for low level users?

How can the unfiltered_html capability be given to non network admins in a multisite install to allow HTML in titles? In wp-includes/capabilities.php (below) it appears that this capability can not ...
1
vote
2answers
88 views

Is there a Filter that I can use to filter the tags before they are inserted in to the database?

I want to filter the tags before they are inserted into the database. I'm aware of the pre_insert_term filter. But what I need to do is to see all the tags at once. I need to limit the number of tags ...
4
votes
2answers
5k views

Default Image Link Removal

Just wondering if there is a way to remove WordPress's default function of adding a tag around an inserted image. I assume its a "remove_filter" function like you can do for WPAutoP, but all my ...
0
votes
1answer
127 views

How to create a list of terms who's posts also have a predefined external term?

I have a pretty extensive music collection and my friends are always borrowing my stuff. I would like to keep better track of my library so I'm building a sudo-checkout system using WP. The ...
0
votes
1answer
230 views

Filtering posts on Post Administration Page by Week Number instead of by Month

Has anyone written or can suggest a plugin that would replace the filter-by-month in the Post Administration screen with filter-by-week-number instead? e.g. a drop down option for "Week of ...
0
votes
3answers
2k views

What's the proper way to use the get_image_tag filter?

I'm attempting to remove the title attribute for post thumbnails (on certain posts), and I assume the get_image_tag filter is the way to do this. However, what I've got so far isn't working. What do I ...
2
votes
1answer
1k views

How to filter a dd/mm/yyyy date from a custom field in a query

I'm trying to build a query in order to sort some posts by a date custom field, where the dates are formatted dd/mm/yyyy. It works by querying the database directly with get_results like in this ...
0
votes
1answer
171 views

Filter Text from sidebar widget?

Hey guys, I'm using a calendar plugin that provides a sidebar widget to show current calendar dates. However this widget always shows N/A if I don't set a category for a specific event. Any idea how ...
0
votes
1answer
402 views

Fix warning: Missing argument

i want to submit a theme to the wordpress.org. when i put the define('WP_DEBUG', true); in my wp-config.php. my theme showed some errors.but i don't know how to correct theme. Q1:Warning: Missing ...
0
votes
1answer
2k views

Remove filter and view options from custom post type edit screen

I have my CPT edit screen almost looking how I want it but want to remove the filter and view options from this screen as they are not needed for this interface. How do I remove them? Are there any ...
0
votes
2answers
594 views

Add filter to the end of the post

I have a function which is used to display a video, I want this video to be shown after the post, It should display the video when the post ends. I have added filter to it, but then too, the video is ...
2
votes
1answer
348 views

Wordpress Genesis Child Theme Filter divs

I'm trying to html5ize a Genesis child theme. So far I've figured out how to replace the Doctype via hook but am having trouble figuring out how i can change the divs to sections and articles without ...
0
votes
3answers
705 views

How to retrieve the postID in a “image_send_to_editor” hook function?

Here is my function: function insert_img_rel_attrib( $html, $id, $caption, $title, $align, $url ) { $postID = ??? $rel = "<a rel='shadowbox[".$postID."]'"; if ($url) {$html = ...
2
votes
2answers
549 views

Best way to programatically add “rel” attributes to page and post images

For single posts and pages, I would like to add certain rel attributes to all the images on the contained therein added with the "Add Image" functionality on the edit screen. The attribute would be ...
2
votes
2answers
405 views

Allow users to exclude categories? (WP 3.1.2)

How do I let users exclude/include specific categories, so that everything (archives, search, etc) is limited to those categories? I've seen admin-side plugins that let me limit what others see, ...
1
vote
1answer
860 views

Adding TinyMCE buttons without removing plugin buttons?

I'm developing a plugin that I'll install for all my clients to make WordPress slightly easier to use for them. One of the things it will change is the default TinyMCE configuration. It'll add things ...
3
votes
1answer
450 views

Highlight nav menu terms

OK so i have custom post types and custom taxonomies. I have a sub-menu that is made of the custom taxonomies. Example: registered taxonomy: Movies and terms: action, adventures, etc. (= menu ...
0
votes
2answers
633 views

Change custom post type GUID in RSS

So i got the RSS feed which output some custom post types, but the GUID looks bad to me, it's like: ?post_type=mycustompost&p=124 The reason i want to change this is that I don't need people to ...
0
votes
2answers
332 views

How to internationalize header image?

I have in the following code in the template: <img src="<?php header_image(); ?>" /> However, I want to change this image according to the language selected (through GET parameter ...
1
vote
3answers
1k views

Saving custom profile fields

I'm adding a custom profile field to users of a specific role, like this : function add_custom_profile_fields( $fields ) { // get current user ID $user = new WP_User( $_GET['user_id'] ); ...
6
votes
3answers
6k views

How to know what functions are hooked to an action/filter?

Is there a way to know what functions are hooked to a particular hook? For example if I'd like to know what functions are hooked to the wp_head hook.
1
vote
1answer
2k views

register_taxonomy and register_post_type does not work [closed]

I have a problem using the register_post_type and register_taxonomy on my Wordpress. I created the code on my functions.php and it does not update my panel. Why? //Categorias personalizadas ...
1
vote
1answer
502 views

Can't filter wp_get_attachment_link

Can't figure out why this won't work: function my_get_attachment_link($html){ $postid = get_the_ID(); $html = str_replace('<a','<a rel="shadowbox['.$postid.']"',$html); return ...
-1
votes
1answer
114 views

if i put the code in my theme's function.php file can it work?

$gr_preview_theme = $_GET['preview_theme']; $gr_preview_css = $_GET['preview_css']; if (! $gr_preview_css ) $gr_preview_css = $gr_preview_theme; if($gr_preview_theme && ...
2
votes
1answer
2k views

Hijacking the URL for filtering

Right, here's the deal. I've got a loop of which displays news posts, these posts can belong to special categories (not normal categories) and I want to be able to filter by them. If I wasn't too ...
7
votes
1answer
617 views

Assign a Class to the Current “Tag” for Formatting

Essentially what I am hoping to replicate is something like the "current-menu-item" class that is applied to WP Menus. My client is wanting to use Tags as a sub-nav, and I've managed to get the tags ...
2
votes
2answers
5k views

Add_Filter example for wp_get_attachment_link

Let me preface by saying I don't really understand Add_Filter, but I think that I want to be using it here. If not please let me know. I want to modify wp_get_attachment_link so that the link url ...
1
vote
1answer
346 views

Wordpress Post # of # filtered by category slug

I want to show post #4/100 at the top for each post for which I'm using following code function updateNumbers() { /* numbering the published posts: preparation: create an array with the ID in ...
3
votes
1answer
1k views

get_option() filtering and getting out of recursion

get_option() provides couple of filters 'pre_option_'.$option and 'option_'.$option. However most times I tried to make use of these it usually explodes and not worth the trouble - either I need to ...
12
votes
2answers
9k views

Explanation for apply_filters function and its variables

I'm learning how to build html forms using PHP by taking an example from "simplr form registration" plugin. I'm looking at this code: $form .= apply_filters('simplr-reg-instructions', __('Please ...
0
votes
3answers
3k views

get variable from url?

say i've got a url http://bfami.modernactivity.co.uk/category/museum/orderby/date/order/desc/ that works with; add_rewrite_rule( ...
6
votes
4answers
777 views

Apply class to every paragraph that holds image?

When adding an image to a page or post, Wordpress is automatically adding a paragraph tag <p> as parent holding the image. Like so: <p><img src="my-image.jpg" alt=""></p> ...
1
vote
2answers
1k views

Filter Home Page Posts in Buddypress [closed]

I would like to remove blog posts from the home page if they belong to a certain category. How can I go about this in Buddypress (preferably without a plugin)?
6
votes
5answers
6k views

Remove classes from body_class

I don't need this whole mess of classes like this... <body class="page page-id-829 page-template page-template-page-template-portfolio-php portfolio"> I'd like something like this... <body ...
0
votes
1answer
256 views

BuddyPress - A hook available to hide custom born date on public profile view?

I'm trying to hide some fields on public BuddyPress profiles, it is possible? Thanks in advance.