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

learn more… | top users | synonyms (5)

2
votes
1answer
947 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
170 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
342 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
1k 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
561 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
340 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
628 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
533 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
386 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
811 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
442 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
531 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
289 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
995 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
4k 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

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
490 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
113 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
562 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
4k 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
322 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
941 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
7k 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
2k 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( ...
2
votes
1answer
555 views

Apply class to every paragraph that holds image?

Hey guys, When adding an image to a page or post wordpress is automatically adding a paragraph tag as parent holding the image. since there is no parent selector in CSS I'd love to find a solution ...
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)?
5
votes
5answers
4k 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
250 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.
2
votes
1answer
766 views

what is __return_false in filters

I was thinking of removing/hiding admin-bar from my wordpress (3.1.1) installation. I visited following link: http://codex.wordpress.org/Plugin_API/Filter_Reference/show_admin_bar I was surprised ...
3
votes
2answers
1k views

Allow html tags in WordPress Custom Menus Description Field

I added descriptions to my menus using this post, Menu items description?. However I need to be able to use html tags and WordPress is stripping them out. Can anyone help?
0
votes
1answer
136 views

How-to inspect filter-able $vars?

Note: This is more of a tutorial/wiki than a real question and should be a reference for later Questions. If you got something to add, please feel free to add an answer. Working answers get upvoted. ...
0
votes
1answer
235 views

What's the best way to echo out a filter variable?

I have a plugin filter that isn't working for me: add_filter( 'gform_notification_email_3', 'route_notification', 10, 2 ); function route_notification($email_to, $entry) { global $post; ...
1
vote
2answers
216 views

Widget Area: Modify $param['xy'] from widget-$n

I have different widget areas. One is a horizontal area that may contain eg. 4 widgets next to each other. My Question is how would i add a different eg. $param['widget_title'] to widget number $n ...
0
votes
1answer
266 views

wordpress is automatically linking plaintext email addresses

Hey guys, I'm using the latest version of wordpress (3.1.1). Is it just me, or is wordpress now automatically linking plain-text email addresses? I type jdoe@email.com as a comment and it shows up as ...
7
votes
1answer
4k views

Row actions for custom post types?

I'm working on a plugin, which converts a site into a feedback sort of portal. I made a new object page, 'Feedbacks', which displays all the feedbacks is a tabular format, and I'm using ...
0
votes
1answer
106 views

Pre-existing arguments when using queries

I am struggling to understand how queries work with get_posts(), query_posts() and WP_Query(). In particular I do not understand what pre-existing selection may exist when using these on a given page ...
1
vote
1answer
2k views

add_filter to youtube embeds?

hey guys, when posting a youtube video link in the backend (in a post or a page) wordpress is automatically creating the embed code for me. Is it possible to add a filter to that? I'd love to change ...
1
vote
1answer
3k views

adding a filter to a shortcode?

<?php echo do_shortcode('[mingleforum]'); ?> inserts the mingle forum into my content! is it possible to use add_filter() on that?
12
votes
6answers
15k views

remove empty paragraphs from the_content?

Hey guys, I simply want to prevent the creation of empty paragraphs in my wordpress post. That happens quite often when trying to manually space content. I don't know why this doesn't take effect? ...
1
vote
1answer
210 views

get_bookmarks filter not supplying query argument (wp 3.1)

I'm using a filter on the get_bookmarks function. When I use two arguments in my filter function I get the result array and nothing for the second arg (it should be the parsed query). Here's what I'm ...
5
votes
3answers
2k views

Is there a way to add another row to the tinyMCE kitchen sink toggle?

The tinyMCE "kitchen sink" toggle button shows/hides a row of buttons. I have successfully added my row of shortcode buttons to the tinyMCE editor, but I was wondering if there was a way to make my ...
1
vote
1answer
317 views

remove inline scripts from the_content() produced by plugins?

hey guys, any idea how I could filter all inline javascripts from the content()? thank you
0
votes
3answers
788 views

What hooks to hook onto for automatic cache clearing

I have a WP-site with not that many writes, but quite a few reads and a few specific hotspots in the templates that I'd like to cache pretty aggressively with my own PHP-caching mechanism. I could ...
1
vote
2answers
3k views

How do I add a listbox to the TinyMCE editor?

I am having trouble adding a list box to the TinyMCE editor in Wordpress. I have already read entirely through this question but it did not get me all the way there: How i can i add a split button or ...
1
vote
1answer
1k views

When adding buttons to the tinyMCE editor, how do I make them wrap to the next line and/or display in the “Kitchen Sink” area?

I'm successfully adding buttons to the TinyMCE editor in Wordpress, but the problem is they all show up to the right of the Kitchen Sink button and I have so many that I need them to display on a new ...
0
votes
4answers
2k views

Remove Page Title from Static Frontpage

I'd like to remove the post title from my static frontpage. Just that page. I've created a child theme from a free Press75 theme. So I'd like to make this change in my child theme's function.php. I ...
1
vote
2answers
546 views

problem with implementing widget via the_content()

hey guys, I really need you help with this one. I'm using the subscribe2 Plugin (for email subscriptions). I want to show the signup form as a widget. The plugin author recommends doing it the ...
2
votes
3answers
5k views

Moving sharedaddy buttons (in Jetpack) to the top of a post?

How would one move the sharedaddy buttons included in Jetpack to be placed before a post's or page's content, rather than after it? I see that in sharing-service.php the function that prints the ...
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 ...