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

learn more… | top users | synonyms (5)

0
votes
2answers
509 views

Create subpage - filter parent pages list

I have a website here with a lot of content and with the content where is necessary to create pages in hierarchy. But it is uncomfortable to go through the dropdown in the administration with a lot of ...
1
vote
1answer
26 views

Filtering The Loop For Single Page and Blog Page

I want to start a div when loop starts in a single page ( also in the blog page ). And end that div when loop ends. Obviously using any filter hook or action hook. Thanks In Advance
1
vote
1answer
961 views

Only let plugin add actions to wp_head & wp_footer on single posts

I'm using a a plugin (Comments Evolved) on a recently built site. The issue I'm having is that this plugin globally enqueueing and adding actions to the head and footer of all pages. I'd like to ...
0
votes
0answers
14 views

Search and replace post URL's on page output?

Currently, I'm using pretty permalinks for SEO purposes like this: http://example.com/sample-post. This is great for search engine ranking, but now I am finding this is not so great for mobile app ...
0
votes
0answers
22 views

Are immediately-called actions not usable in themes?

If there is a filter or action called immediately in a plugin file (not on 'init' or 'wp' action etc.), is it at all possible for a theme to filter it? Looking through wp-setting.php I would assume ...
0
votes
0answers
21 views

Add custom filter to register data in array

I would like to register a multi arry of data in a plugin and allows any developper to add new value to the array. This multi array contains a name, and different value like this: class ...
0
votes
0answers
21 views

Email is not sent while adding add_filter in wpDiscuz - WordPress Comments plugin

Currently i am using a wordpress plugin named "wpDiscuz - WordPress Comments" which sends email notification to the user list present in "wc_subscriber" table, but i have hided the default code which ...
0
votes
0answers
13 views

How to flter a variable result in the Profile Builder plugin?

I'd like to understand filters in WordPress plugins as well as I understand actions. Is it possible to filter a variable being returned by a plugin? In this case, the Profile Builder plugin for ...
0
votes
1answer
25 views

Hook for altering the content of all wp mails

Hi i want to set email template for all mails for my site . I know how to set up mail template and i set mail template for each of my mail by editing the code ie wp_mail( $recipient, $subject, ...
0
votes
0answers
20 views

Populate Multiple dropdown

It's a bit complicated here. But I'm in real trouble right now. Let me explain I want 3 dropdowns populate by order. unless the first it will be disabled. product year (product custom taxonomy) x ...
0
votes
1answer
15 views

Unable to get Wordpress's apply_filters('site_url') to return a https scheme

I am in the middle of migrating a Wordpress site to being entirely https://, but I am having trouble with the login page. The login page itself is loading with the https:// scheme, but the form ...
1
vote
1answer
404 views

list category posts under its item in menu

When adding category to Menu, I need it to list all the item that belong to that category in separate UL automatically. like this http://i.stack.imgur.com/ulOOS.jpg Of course I can do that manually, ...
0
votes
1answer
2k views

Add filter to wp_dropdown_pages() or wp_dropdown_categories() - no select container?

I'm working with wp_dropdown_pages() and wp_dropdown_categories() and both are always outputting a <select>-box with its <option>s as items. Is it possible to add a filter/hook to this ...
0
votes
1answer
16 views

changing size image within the content

I'm trying to get my images inside the post may larger than 800px ; For this I took a function that resizes image here and I'm trying to create a function to my thumb inside the post come with size ...
0
votes
0answers
49 views

How To Sort and Filter Admin Custom Taxonomy Columns

I have a custom post-type with associated custom-taxonomies – how can I make these custom taxonomies sortable in the custom post-types admin/list view header (similar to how dates is sortable)? ...
1
vote
1answer
27 views

body_class filter - Is there a better way to write this code?

I would like to add a body class depending on what sidebars are active, and a body class if my before-header widget area is active. I have got it to work, but I would just like to know if there is a ...
0
votes
0answers
23 views

Modify content if has shortcode

I have a post or page , the content of that post or page is similar to the following Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et ...
0
votes
0answers
15 views

hook for adding a new column in woocommerce subscriptions

I try to add a new column in Woocommerce subscriptions, I would like to know what hook i will need to display my new column Thank you Nilda
0
votes
0answers
13 views

Best way to filter posts being displayed on the fly

I got the following post structure: The search box is to illustrate what I want to achieve. CPT Videos: Videos being displayed in the image. CPT Artistas: Another post type for the artists. ...
2
votes
1answer
1k views

How can I display parent and child taxonomies in separate drop downs?

The requirement is where i have a taxonomy State which is the parent and it has a child sub-taxonomies they are the Cities, Need to display the state as a drop down, when i select the particular state ...
0
votes
0answers
25 views

add_filter Add To Content, Not Replace Existing Filter Function Content

If I am trying to add content to the content generated by a plugin/core filter function - how is this accomplished? The specific situation I am attempting to accomplish - I want to add the widget ID ...
3
votes
1answer
77 views

How can I get next/ previous post links to order by a filter (by the last word of the title)?

I am trying to use the next/ previous post link functions by Wordpress to move between posts of a custom type based on the surname of a person. The custom type represents a person with a post title ...
0
votes
1answer
24 views

functions.php filters not applied in AJAX call

I've added an element to a menu with php (code simplified for illustrational purposes): add_filter( 'wp_nav_menu_' . $menu_slug . '_items', 'add_menu_item' , 10, 2 ); function add_menu_item ( $items ...
0
votes
1answer
24 views

Filter Content on all Post Types

I had this idea to introduce a 'post type footer' using Advanced Custom Fields so that my users could set up common, reusable messages or calls to action and have them appear after the content of a ...
0
votes
1answer
209 views

GET form action. Redirect to self

I'm writing filter for posts by category on author page. I send category name in $_GET array in this form: <form action="" accept-charset="UTF-8" method="get" id="form1"> <select ...
0
votes
0answers
18 views

How to setup a new image size in a child theme?

I need to setup a new size for a thumbnail that will be used by a plugin but I can't get this done, this is what I have so far: /** * Registers a new image size. This means WordPress will create a * ...
0
votes
0answers
22 views

Adding placeholders to the sidebar-login widget plugin

It is my understanding that you may use the filters to code the placeholders to the plugin 'sidebar-login widget'. The programmer Mike pointed me to the code location where it should go: ...
0
votes
0answers
11 views

How to keep the sort order or filter applied in prev/next navigation?

I have an online shop (apartments for rent) using Woocommerce in Flatsome theme. The viewer can sort using the Woocommerce sort by dropdown menu, and filter items using Woocommerce filter widgets. ...
0
votes
1answer
35 views

Publish button inside custom field group

Is it possible to move the publish button out of the publish metabox, completely remove the metabox and then put the publish button inside the custom field group? Ask if you need more information, I ...
0
votes
1answer
48 views

Custom query with post_class filter using current_post not working

I have a new WP_Query on my archive page. I also have a post_class filter conditionally adding a class of first so I can display them in rows of 3 reliably. This is the post_class filter function ...
0
votes
2answers
49 views

preview_post_link for Custom Post Types

I've got a custom post type, and I'd like to be able to change the preview link but from what I can tell, the hook for preview_post_link only affects the default post type. Any guidance? Here's what ...
6
votes
1answer
4k 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 ...
0
votes
1answer
22 views

Variables in post title

How can I make my post title dynamic? Let's say I'm trying to make a post with this title: Today is [day]/[month]/[year] [day] should be parsed into a php code that will retrieve the current day, ...
0
votes
2answers
48 views

hook filter after the_content on a specific page

I've made a function to hook after the_content. This is only working on certain pages/posts. It's working on the default template but not on my custom one's. function insertFootNote($content) { ...
3
votes
1answer
2k 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 ...
0
votes
1answer
2k views

How to change/rewrite the lost password url?

I used iThemes Security (formerly Better WP Security) hide back-end functionality to change the login url to /signin however clicking the lost password link /wp-login.php?action=lostpassword now ...
3
votes
1answer
118 views

Use REGEXP in WP_Query meta_query key

I know I can use REGEXP in WP_Query like this: $query = new WP_Query(array( 'posts_per_page' => -1, 'post_status' => 'publish', 'meta_query' => array( array( ...
0
votes
0answers
21 views

wp_get_attachment_link filter for not working for inserted images

I want to change the value of title attribute of attachment link of the image by caption. I am using following code. It works fine for the images in gallery. But when try to do this for the inserted ...
0
votes
2answers
141 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
279 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
95 views

How to hook into action/filter call

I'm about to create a very simple logging plugin. Every time an action or filter is fired I need to log it to the file. The idea is that we will be able to see exactly which actions and filters are ...
0
votes
1answer
30 views

WordPress Permalink feature alternative

I'm trying to prefix my permalinks for some backend logic to emulate posts on Multisite. I have used the post_link filter but unfortunately it didn't meet my needs as it doesn't prefix the permalink ...
1
vote
1answer
20 views

Add filter menu to admin list of posts (of custom type) to filter posts by custom field values

Also the same question as here: Add filter menu to admin list of posts (of custom type) to filter posts by custom field values But need to search by selecting meta_key and searching by meta_value but ...
9
votes
3answers
8k 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.
2
votes
2answers
57 views

Change upload directory on custom plugin page

I am trying to change the path to my uploads directory when on this one specific page in my custom plugin. The page is a standard php page and not any specific type of post type page. I have found ...
0
votes
0answers
19 views

How to modify core when there is no hook?

I want to add a custom HTML5 attribute to the <form> element in the comments form. Since the form field itself is generated by comment_form(), and there is no hook to edit within the opening ...
0
votes
1answer
60 views

WooCommerce comments_template Filter Not Firing

I have a template file that is being called via wp_ajax that returns data from a specific WooCommerce product. In the "tabs" section of the template file every tab is working fine: Description - ...
0
votes
1answer
56 views

Remove comments validation (remove filter?)

How i can remove wordpress comments content validation, I do not want to or examined the earlier there was no such comments. I see for: ...
0
votes
0answers
33 views

Prevent WP from wrapping html in caption shortcode after 'image_send_editor' filter is applied

In my functions.php I have cooked up some functions to filter the attachment output code, when an attachment is sent to the editor. function filter_image_send_to_editor($html, $id, $caption, ...
-1
votes
1answer
21 views

WordPress plugin add_filter returning a link does not work. What is the correct way?

function ls_de_options($content) { return '<h3><a href="www.google.com">Hello World</a></h3>'.$content; } add_filter( 'the_content', 'ls_de_options' ); ...