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

learn more… | top users | synonyms (5)

0
votes
1answer
951 views

Custom Register Link on Backend Form

I want a similar solution like this one for my login form on the backend of my WordPress installation: Forgot Password URL Filter What I want to do instead of returning a custom forgot password url, ...
2
votes
2answers
2k views

Get password when user registers and save it sha1 into database

im working on a website where the users can connect with iphone to some functions of it by using a sha1 encrypted password. In other words the plain password of wordpress encrypted in sha1. In the ...
1
vote
2answers
89 views

Same Conditionals Not Working on Two Different Hooks

Everyone! I am new to WP and trying to build a plugin. I have the following codes working properly: add_filter('the_content', 'say_hello'); function say_hello($content){ if(is_single() || ...
5
votes
1answer
4k views

How to appending to the_content using add_filter with custom post type?

I have a custom post type running fine, but some of the text in the page is the same for every post, so I want to add it in using a function. I have this set up: function ...
0
votes
1answer
4k views

add_filter for specific pages

Is it possible to add this filter add_filter("the_content", "magicalender_get_event_page"); But only for one specific page, for example if($post->post_name == "magicalenderpage") If I put the ...
0
votes
1answer
316 views

Help with add_filter('the_content', 'some_function') and multiple matches

I have a site where a user can insert slideshows into a post by entering the shortcode in the content box. He can also add videos by adding the video code in the same box. I need to separate these two ...
0
votes
1answer
127 views

output custom Posts on a Page

I'm trying to write a function that will output a set of posts on a page. Because I want to display more than just the post titles, wp_get_archives() won't do (I think). The function to add the post ...
3
votes
3answers
2k views

How to publish a post with empty title and empty content?

Why I'm doing this you might ask? I'm developing a website for a business with a portfolio where the gallery items are posts. These posts are populated through custom fields and category selections, ...
1
vote
2answers
717 views

How do I add a TinyMCE row that all users can see, instead of just admins?

Currently I have successfully added a row of shortcode buttons to the TinyMCE editor in WordPress. The problem is, only admins can see the row, and I need contributors and editors to see it too. I ...
4
votes
1answer
235 views

Why, Where, and When to use reference pointers in filters/hooks?

Why, Where, and When to use reference pointers in filters/hooks? What are the potential cons of not using them when suggested or required? Just looking for a more detailed answer than the codex ...
-1
votes
1answer
258 views

A to Z list for custom post types

Anyone know a plugin or any other solution to list posts filtered by the first letter from custom post types? I found some plugins, but nothing seems to work with custom post types.
3
votes
1answer
793 views

Remove date and category filters when editing custom post types

The answers to this question give excellent instructions for adding filters to the admin edit.php screen for custom post types. But they don't explain how to remove the existing filters on date and ...
0
votes
2answers
2k views

How can I remove filters from custom post types?

I created a custom post type which I'll use as landing page for PPC. Now on that custom post type I would like to remove all the filters which are adding the social media buttons for example. I tried ...
2
votes
1answer
729 views

How do I add a current class to the current post?

I have this list set up of the latest 7 posts: <ul id="post-list"> <?php global $post; $args = array( 'numberposts' => 7 ); ...
3
votes
2answers
959 views

Display only certain posts based on visitor's country?

Is it theoretically possible to have the following feature? Each post has a country code. When a visitor comes in, the system will determine the visitor's country code. Then when the page renders, ...
1
vote
1answer
7k views

What do add_filters() and apply_filter() do?

I'm a bit confused as to why this isn't working - although it must be said I'm not that sure what apply_filters() and add_filter are doing, so any general tips would be great too! I want a query that ...
1
vote
1answer
4k views

Customizing Wordpress the_title with add_filter

I'm trying to create a custom wordpress title for a posts made under a custom post. Basically, its a version changelog for an application. I would like to only input the version number in the title ...
0
votes
1answer
288 views

Get current taxonomy and display query accordingly

Okay i'm having a bit of a catogorisation/taxonomy/filtering problem here and am at loss on how to solve this. I hope someone could help me on the way a bit. Say I've got a blog about food, with a ...
3
votes
3answers
2k views

How to correctly get post type in a the_title filter

I want to prepend text to the post titles of a specific custom post type, but the filter below didn't work. Instead of changing only that CPT's post titles, it changed all titles on the given CPT's ...
6
votes
3answers
877 views

How to filter by post-format in admin?

I need to filter my posts by Post-Formats in admin ? How can I do that ? For now, Wordpress allows to filter by Categories and Dates.
1
vote
2answers
2k views

Default or Preset Content for Custom Post Types

I am trying to modify the code for default content to display based on post type, but so far I have been unsuccesful. The base code is: add_filter( 'default_content', 'my_editor_content' ); ...
0
votes
2answers
877 views

Editing wp-config.php

I need to add the line define('WP_POST_REVISIONS', false); to my config.php , so that post revisions are disabled. I don't have access to wp-config.php, I have permission to edit my theme and ...
1
vote
1answer
197 views

Change comments form title on a page by page basis

I'm looking to change the comments form title (my theme defaults this to "Leave a Comment" or "Leave a reply to"). I thought perhaps I could add a hook to comment_form_defaults but my snippet below ...
0
votes
1answer
3k views

Getting post id from wp_insert_post_data function?

I'm trying to use the function get_the_tags() from outside the 'loop'. I understand this can be achieved by using the post ID like get_the_tags($postID). Does anyone know how I can get the post ID ...
1
vote
1answer
1k views

How to filter WordPress search, excluding post in some custom taxonomies?

I want to filter WordPress search (and also WordPress listing of posts) on 2 values of a custom taxonomy. I tried this code, filtering my custom taxonomy named "marque", excluding 70 or 67 IDs (nb : ...
1
vote
1answer
660 views

Filtering post-formats from the loop using new WP-Query();

Hi i am currently building upon a theme that i have build previously for my blog. The following code is to point to the latest post (the featured post). As this will have a different styling than all ...
0
votes
1answer
429 views

Using add_action before add_filter on a plugin?

I'm writing a plugin and having a problem. I have add_action('publish_post', 'sender'); and I want this function to run first before the add_filter function, although it won't. Is there a way to do ...
0
votes
1answer
160 views

Is it possible to add an argument to a custom function added to a filter hook?

Example: I'm trying to modify an instantiation of WP_Query by using the posts_orderby filter like so: add_filter('posts_orderby', 'favorites_orderby'); $new_query = new WP_Query($args); ...
0
votes
1answer
57 views

Is there a way to figure out which action/filter invoked a function?

I'd like a lightweight way to figure out what is invoking a certain action in an effort to provide logic for certain scenarios where I can't help to avoid a function invocation (for example, a new ...
4
votes
2answers
858 views

Custom theme hooks / filters - passing arguments

I'm getting confused trying to implement these custom theme hooks. Trying to wrap my head around that. I thought i understood this. but now after reading code for several hours; it's made it worst. ...
0
votes
2answers
927 views

Sort posts after filtering them through multiple taxonomies

I'm using scribu's Query Multiple Taxonomies to filter posts through multiple taxonomies (which works great!). However, I'd like to allow people to perform further sorting on the results based on ...
0
votes
1answer
206 views

Prepending character(s) to a custom <!--more--> tag title?

I'm hacking around with a blog using Cordobo Green Park and I've noticed when I specify a custom title, instead of it beginning with a » symbol (as it does for the standard "» Read more: ...
1
vote
1answer
479 views

How do I access the menus produced by Dashboard > Appearance > Menus

A continuation to this question: Replacing WordPress menu functionality with a plugin Since I really rarely work with WordPress (I've done a lot of work with phpBB, myBB, Concrete5, and custom PHP ...
1
vote
3answers
4k views

Using filter to add additional fields to comment_form()

I want to add a field to the comments and have used these codes. functions.php function my_fields($fields) { $fields['url2'] = '<p class="comment-form-url2"> ...
1
vote
1answer
1k views

Categories of custom taxonomy don't show any posts

I want to display posts from categories of my custom taxonomy but realy don't know how to achieve this. I am using isotope filtering which works as expected with default post categories. I can click ...
5
votes
1answer
3k views

What is the very earliest action hook you can call?

After the solution to this question was to get a function to launch BEFORE the init action is fired by taking the sequence out of its function, it got me thinking, is there any earlier in the WP load ...
1
vote
4answers
2k views

Make parent categories not selectable

I'd like that my categories having child-categories don't be selectable on the post article page. What I want to do is to remove the checkbox before their label. I've looked the filter documentation ...
1
vote
1answer
356 views

In need of a content replace filter for posts in a specific wordpress category

I have been doing some research on this but can't get a handle on the exact code I need to do this. I am using a wordpress content slider that strips out <ul></ul> and ...
6
votes
2answers
2k views

Earliest hook to reliably get $post/$posts

What's the earliest possible action I can hook into where I'll be able to access the global $post/$posts variables on both the front and back ends? I've tried looking through the Codex reference, Adam ...
0
votes
1answer
413 views

Why doesn't my simple the_title filter get applied?

I have added the code below to an active plugin, but it's having no effect on my posts. add_filter( ‘the_title’, ‘myfunction’); function myfunction($title) { return "Why won't this work?" . ...
1
vote
1answer
596 views

How to modify an existing meta description?

I'm coding a plugin that allows me to dynamically insert content for my meta description and title. The content is already being pulled fine, the only part I can't get to work is actually filtering ...
1
vote
1answer
930 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
559 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
403 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
354 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
159 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
145 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 ...