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

learn more… | top users | synonyms (5)

0
votes
1answer
29 views

Renaming wordpress login and get new password button

I am currently building custom wordpress admin login theme.Now I have an idea but not sure it is possible.I want to rename "Get New Password" to something "Get New". Is it also possible to rename "Log ...
0
votes
1answer
78 views

How to Highlight current category on category and single page template?

On Wp Forums, I found a code that shows categories with images and it works very well. But I couldn't figure out how to highlight current category on category.php and single.php Here is the code that ...
2
votes
1answer
56 views

Remove tags from the kses filter

I know one can modify the kses filter to add new allowed tags to it, but is there a way to remove some of them? I can't find how. I need to disallow DIV tags. Any ideas? Thanks
0
votes
1answer
23 views

Loading a sidebar on an Ajax call

I wanted to load a custom sidebar when doing an Ajax call, so I found the way with: add_filter( 'loop_start', 'my_sidebar_widget', 25 ); but it is showing the sidebar even in media admin panel, so ...
0
votes
1answer
46 views

What is the action or filter for adding information under the Permalink in Edit Post/Page?

I would like to add some HTML under the "Permalink:" in the Edit Post/Page page. Under here: So what is the action or filter?
0
votes
0answers
56 views

Removing image dimensions from `the_content`

I'm looking to remove image dimensions from the_post_thumbnail, as well as the_content. I've found the following code, but there's a slight issue: add_filter( 'post_thumbnail_html', ...
1
vote
1answer
85 views

Filter or action hook to insert content on admin pages before </body> tag

I am developing an administrator plugin and want to be able to write some HTML content just before the last body tag . This content will initially be hidden then displayed with javascript when a user ...
0
votes
1answer
100 views

the_excerpt() does not work with has_excerpt()?

I'm trying to shorten the excerpt but it does not work. It shows the full excerpt which I write in the post edit! I've added this to the functions.php function custom_excerpt_length( $length ) { ...
0
votes
2answers
51 views

Using filter in the widget causes fatal error

I'm adding a filter for a WordPress query in a widget. I'm adding as following: function filter_where( $where = '' ) { } add_filter( 'posts_where', 'filter_where' ); $query = new WP_Query( $args ); ...
0
votes
1answer
54 views

Is there a filter for get_post_custom()?

I know there's a filter get_post_content that I can hook into, but that only seems to work with get_post_meta, I need to filter individual values of get_post_custom() by checking if the metadata key ...
0
votes
0answers
57 views

Display Category only if there are posts of custom type

I need to do a small modification on WP site done by someone else. And my WP experience is close to zero. But I'm comfortable with PHP. Wordpress Version: 3.8 Plugins: ONLY Advanced Custom Fields ...
0
votes
1answer
203 views

Buddypress Group Activity Loop Filter activity type [closed]

I'm using Buddypress 1.8.1 When the group home page load I want to show only 'activity_update' and 'joined_group' activities in Activity Loop. Here is my Activity Loop code. It is standard loop ...
2
votes
1answer
416 views

Refine/Filter WP_Query Posts with jQuery or Ajax

I know this has been asked many many times, but I literally searched for an answer for more than 5 hours without finding anything that drives me in the right direction. What I'm trying to achieve is ...
0
votes
0answers
19 views

How to add parameters on add_filter()? [duplicate]

I have this example to customize the excerpt length: function custom_excerpt_length() { return 30; } add_filter( 'excerpt_length', 'custom_excerpt_length' , 10, 1 ); and works perfect. But I want ...
0
votes
0answers
61 views

Diffrent search templates for different post types

I have a site with diffrent post types. Two of them are the 'post' post type and the other one is 'charity', for both pages I have an index, the normal index.php and a diffrent page template for ...
0
votes
1answer
39 views

Is there a way to overwrite a filter used in canonical.php?

I am trying to replace the base functionality of the wp_signup_location to something custom. I realized that in canonical.php is where the filter is defined. Is there a way to redefine ...
0
votes
1answer
86 views

Proper after_setup_theme and wp_head cleanup

Im trying to clean up code in my theme a little bit, remove some of the code that is not used and basically do things the right way, to decrease load time etc. Currently I have this code: ...
2
votes
2answers
54 views

Please help me through this example with a filter to understand how they work

I am looking at this generate password function: function wp_generate_password( $length = 12, $special_chars = true, $extra_special_chars = false ) { $chars = ...
0
votes
0answers
94 views

Query Posts Via WordPress URL

I wanted to learn more about querying post types and their custom fields in WordPress. I've got two questions... I've followed this tutorial on Advanced Custom Fields and am trying to understand what ...
0
votes
0answers
31 views

Custom field in title

I'm trying to change the posts with no titles to 'custom field' + 'mystring'. So far I got this code. add_filter( 'the_title', 'ta_modified_post_title'); function ...
0
votes
1answer
92 views

How to filter bbPress replies (content)?

I wanted to know, how to filter bbPress replies ? ( i mean as the typical post's the_content filter..) this one doesnt work: add_filter('the_content','custommm_functiooonn'); function ...
0
votes
1answer
43 views

How to Use the Filter “sidebar_login_widget_form_args”

I need to rename some of the labels on the Sidebar Login form using the sidebar_login_widget_form_args" filter; I have been trying few days to do this without any success. I would very much ...
-1
votes
1answer
35 views

AJAX: Wordpress filters inside $html do not work as intended

I am sending HTML content through some AJAX magic and while everything is working as I wish, the output gives something along those lines in the page: "http://permalink.comtitle" It's as if all the ...
0
votes
2answers
193 views

Hook for post permalink update

I would like to know what hook should I used when the permalink/url of a post is modified. My goal is to get the old permalink and new permalink so I can used it for my plugin. Thanks. [EDIT] Just ...
0
votes
1answer
35 views

Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )

I've been adding some data to the columns of two taxonomies in a theme I'm working on. I've hit something that's got me confused though. I'm using this hook manage_{$taxonomy}_custom_column but the ...
0
votes
2answers
592 views

Reposition Woocommerce Message

I'm trying to reposition the messages in my Woocommerce theme. For example the successfully added to cart message. They appear to automatically be placed at the very top of where the woocommerce ...
0
votes
2answers
142 views

Help debugging PHP filter for wordpress

I have a PHP filter for wordpress/gravityforms, that just recently stopped working and I can't figure out why. Can anyone help me? Here's the code: add_filter('gform_pre_submission_2', ...
0
votes
4answers
1k views

Programmatically Add Font-Awesome Icons to Category Widget

I use the Categories widget on my sidebar(s) and I would like to display a Font Awesome icon next to each category listed in the widget. The icon would be the same for all categories, for now, but I ...
0
votes
1answer
40 views

Display taxonomy with a maximum number of letters

I'm looking for a function which displays a post's taxonomy with a maximum number of letters. I've achieved with title (How to limit the max number of characteres in the title that are displayed), but ...
0
votes
1answer
44 views

Modify a plugin function output from another plugin

I'm writing a plugin for a wordpress site using a page template using WP Types plugin. My plugin adds a shortcode tag. Shortcode tags inside 'the_content' get processed without problem. But this ...
0
votes
0answers
32 views

getpost content with all formatting for admin pages

All My post usually uses various plugin based data manipulations (Like visual layout, grouping, plugin css, etc) And now I want to render a post content in my admin page. On using following code: ...
0
votes
1answer
109 views

WP filter to alter admin CSS styles?

I want to change the CSS background definition for #wpadminbar in the new WordPress 3.8 admin themes. I can (and have) updated the /wp-admin/css/colors/theme/colors.min.css file but wonder if there is ...
0
votes
1answer
27 views

add after content don't work

I am using this code to put some functions after content, but this one don't work. It appear before the content and not after. function add_wb_posts_pagination ($content) { $content .= ...
1
vote
2answers
66 views

How can i do something after head like adding a hook for after head but before post

What i mean is i am trying to add breadcrumbs to my blog and i thought of adding it before content or after title but there's an issue with that - on archive pages or category pages the breadcrumbs ...
1
vote
0answers
54 views

Add custom text in the media library image meta area

I want to add some custom text in this area in the media library: Is there a filter I could hook into or how can I add content there? If not, how do we do this using Javascript? I want the text to ...
-1
votes
1answer
413 views

wp_query->set for several categories

$wp_query->set( 'cat', '1, 2, 3' ) forms sql query like term_id IN (1, 2, 3) but I need term_id = 1 AND term_id = 2 AND term_id = 3` How to do it with $wp_query->set()?
0
votes
1answer
23 views

Filter / add_action to upgrade.php page

I'm wanting to change the wording and add some styling to the upgrade.php page. We have a situation where we update our codebase across multiple sites via Git - when a user logs in after the update ...
0
votes
0answers
24 views

Filter for modifying image on upload

So I'm working on building a new WordPress plugin for massive PNG compression, and I'm having a hard time finding the right filter to hook in to. I need to access the entire image so that I can open ...
0
votes
0answers
50 views

making a glossary with wordpress

I know that there are glossary plugins in the wordpress repository. This plugins normally searches glossary terms in post content and adds a link to it. But i have not found one, that search and ...
0
votes
0answers
20 views

How can I update the role of a newly added user when displaying the registration form with a shortcode?

Basically I have a shortcode that includes a registration form(among other things). The custom form itself is also included on wp-login.php and user-new.php if the default role is set to ...
0
votes
0answers
85 views

URL parameters causing 404 on home page, but nowhere else

I am writing a plugin that utilizes URL parameters. For some reason, adding one of these parameters to the home page of my website causes a 404 (http://bleaney.ca/?source=asdf). Adding the parameter ...
6
votes
1answer
457 views

Extend WordPress 3.8 Site Activity Dashboard Widget to include more comments

The new Site Activity dashboard widget defaults to showing 5 comments. I'd like to show 10. I can see the code in core /wp-admin/includes/dashboard.php where it calls the function ...
1
vote
2answers
1k views

Customize user account activation message

During the process of a user creating a new account, once they click on the link in the activation email, they receive the message on the login page: Your account is now active! Username: ** ...
0
votes
1answer
46 views

Add 'if exists' to filter

This almost perfectly fixed an issue I had: How do I add the featured image to the_content after the first paragraph? However, if there isn't a featured image, the code still outputs a blank <img ...
0
votes
1answer
121 views

wpmu_signup_user_notification filter not working

I'm trying to customise the activation email in WordPress. I'm using WordPress 3.8 Multisite (subdomain). I added the following code (from ...
1
vote
1answer
80 views

Get current page_id before loop, in functions.php

In the Shoestrap theme, you often change content by using hooks. I want to add the following to functions.php but it doesn't work... // in functions.php if ( is_home() ) { add_action( ...
0
votes
0answers
52 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...
0
votes
1answer
46 views

Adding a Filter to Sidbar Login Plugin to Change Login Button Lable

I'm a newbie and I have not been able to find an answer to my question. I have installed the Sidebar Login plugin and I'm trying to change the form labels, specifically,the login button label. I ...
0
votes
1answer
57 views

Is it possible to track down Actions and Filters?

As far as I know using Actions and Filters hooks is the best approach for developing on WordPress. I have just to ask if there is any way to track down which Actions and Filters are applied on ...
1
vote
1answer
69 views

Question about how do wordpress filters/actions work

I have a question that I'm curious. In WordPress we can add a filter or action like this code: add_filter($filter_Name, $function_will_be_hook); add_action($action_Name, $function_will_be_hook); ...