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

learn more… | top users | synonyms (5)

0
votes
4answers
35 views

How to filter out shortcode when displaying the_excerpt() in the loop?

I'm using the_excerpt() in my template loop to display post excerpt on the front page. It's currently displaying unwanted shortcode directly on the front page eg. [box]post content[/box] ...
0
votes
0answers
10 views

How can I deny the user the insertion of emails in topics / comments and stay on the same page?

I have this function that checks whether or not a content contains an email: function fw_check_if_content_contains_email( $content ) { if ...
0
votes
1answer
9 views

Hook added to the_content seems to be called multiple times

I have the following code running in a plugin: add_filter('the_content','thousand_pay'); //Callback function function thousand_pay($content) { echo $content; if( !in_category( 'Stories') ) ...
0
votes
1answer
14 views

Apply filters when loading post via ajax

Have been trying to solve this for couple of hours already. Here's the case: I'm making a plugin that separates the posts into pages using the <!--nextpage--> tag. It works fine but I want to ...
0
votes
1answer
20 views

I need to hook and change language of facebook sdk

I need to hook into this function to change language to from en to french facebook sdk. $facebook_sdk_src = apply_filters( 'bimber_facebook_sdk_src', ...
2
votes
2answers
24 views

Where to hook into post content?

Which hook or filter is used to edit the post content before the_content filter is applied to it. For instance, if I wanted to add Hello World, as the first text in every post.
-4
votes
0answers
9 views

How to retrieve data from mysql and storing in option html tag?

How to retrieve data from mysql and storing as an array in option html tag? I want to filter the data by "Position" with dropdown. I have a snippet but the data is not display in option tag Link ...
0
votes
2answers
38 views

How to get a single hook from wp_head()?

I am working on a custom post type and I don't want it to get all the clutter from wp_head(). However, I do want to show a specific hook, for example the YoastSEO meta tags. How do I call a specific ...
3
votes
1answer
26 views

Add post/page ID to inserted links within the_content

Within the main content editor of posts and pages, we can insert multiple links to other posts/pages: <a href="http://example.com/hello-world/">Hello World</a> What I am trying to do is ...
0
votes
3answers
938 views

Filter to hook into menu <li> items and add a custom attribute

I'm using Foundation as a base and starter theme. I'm trying to build and I can't seem to figure out how to hook into the menu that WordPress outputs and add a custom attribute to that menu's ...
1
vote
3answers
46 views

Add code inside specific wordpress standard function

Is it possible to add a piece of code snippets inside wordpress standard function ? In my case I am developing a plugin that will trace the exact location of the caller of wp_delete_attachment method ...
0
votes
1answer
29 views

Segment io wordpress custom identify [on hold]

So I did the following based on your suggestions: I added an apply_filter to the plugin: if ( is_user_logged_in() && $user ) { $identify = array( 'user_id' => ...
2
votes
1answer
40 views

add_filter() function misunderstanding

I'm studying the theme "one page" and there is the following code: function onepage_sections() { $sections = array(); $sections['service_section'] = array( 'id' => 'service_section', ...
1
vote
1answer
432 views

Walker_Nav_Menu doesn't work in wp_page_menu_args filter

I need to hide certain nav items from the menu (based on the password protection functionality) and I'm having trouble getting my custom Walker to work. In fact, I can't even get the standard ...
0
votes
1answer
778 views

How to add nav menu items to a specific position within a menu

I'm adding login/logout links to a nav menu using the following code: function rp_add_login_logout_links( $items, $args ) { $link = wp_loginout( get_permalink( get_option( ...
0
votes
0answers
50 views

Filters, priority when run after plugins_loaded

In my main plugin I filter the_content to add rich snippets. Something like this: add_filter('the_content', 'add_schema'); function add_schema( $content ) { $schema = NULL; //To avoid undefined ...
0
votes
1answer
18 views

WP 4.5 hide core customizer sections

Since WP 4.5 the way you hide core components from the customizer was changed. Changed from $wp_customize->remove_panel() to customize_loaded_components. ...
0
votes
1answer
503 views

change attachment custom field onChange event

The form is in post creating window. Ajax is posting values, but the values doenst renews. Where can be problem ? Ajax <script> function dynamic_Select(field, aid, value) { ...
0
votes
1answer
22 views

previous_post_link inside of a function?

I'm missing something on how to call previous_post_link() inside of a function. I also tried assigning the output to a string variable and using that. function prevnext( $content ) { $content .= ...
0
votes
1answer
14 views

change “missing attachment” text functions.php

The wordpress core file : post-template.php as this text "missing attachment" that i want to change with "-" ..the problem is that when wordpress upgrades the file is changed back to the old "missing ...
0
votes
1answer
10 views

How to filter Sidebar Content

I want to filter sidebar content generated from dynamic_sidebar() and only return the last 2 calendar years of archives (not last 24 months). Is it possible to do this sort of filtering and how?
0
votes
1answer
16 views

Adding bootstrap classes to video shortcodes

I want to make videos responsive... There is a function in /wp-includes/media.php file: line 2497: $html_atts = array( 'class' => apply_filters( 'wp_video_shortcode_class', ...
0
votes
2answers
2k views

How to append new form elements in “Add New” form of Users in Wordpress admin panel?

I'm developing a WordPress plugin and I want to append some extra form fields in add new form of Users section inside admin panel without editing core files. Can somebody help me in achieving this.
0
votes
0answers
15 views

Filter Posts in The Grid plugin with meta key

I’m working with a WordPress plugin, The Grid. http://themeone.com/the-grid/ I'm using it on the site I'm building to filter a custom post type called "Projects" which users have the ability to ...
0
votes
0answers
9 views

Filter User Query via URL Like Posts

I have two taxonomies assigned to users and I use them to create a user query and output the users. One of the taxonomies is ESPECIALIDAD, the other is REGION. When I am in: ...
0
votes
2answers
22 views

Passing stored variables to add_filter

I am working on a site where the page titles are generated dynamically from external data sources. So obviously, Yoast SEO/WordPress SEO doesn´t know anything about the correct title, description, ...
-1
votes
1answer
26 views

Using a filter in functions.php to add content to single posts regardless if post is in main or child category

Im using following filter (codex) to add some html content with a lower priority (20) to the bottom of my single posts wich are in a specified category: add_filter( 'the_content', ...
1
vote
1answer
140 views

woocommerce change currency per category [closed]

I am trying to display a different currency on a specific category within my Woocommerce store. Specifically, this category is full of items that can only be purchased through myCred points. The rest ...
1
vote
1answer
24 views

Which hook is fired when inserting media into a post

I want to add numbering to each image when I insert them into the post. For example if I insert 3 images into a post, there will be: Image 1 Image 2 Image 3 I looked through the WordPress ...
1
vote
3answers
46 views

How to reduce original image quality on upload?

I know that I can use the jpeg_quality filter like this: add_filter('jpeg_quality', function($arg){return 75;}); This will reduce the image quality of the images generated during the upload process ...
0
votes
2answers
500 views

apply_filters, EMBEDS and AJAX not a friends?

I encountered a problem... There is content that contains a YouTube link Lorem ipsum bla bla bla http://www.youtube.com/watch?v=nTDNLUzjkpg My plugin display this content with that code in the ...
1
vote
3answers
897 views

Debugging - trying to add search box to menus

I have already asked a similar question at stackoverflow (http://stackoverflow.com/questions/22492292/add-filter-in-wordpress-how-do-i-know-if-it-is-run), but maybe that was the wrong place? As you ...
0
votes
0answers
15 views

Removing commercial theme's custom autop on specific pages via functions.php

So my problem is with using the custom theme Karma at http://themeforest.net/item/karma-responsive-wordpress-theme/full_screen_preview/168737 Great theme.. except it removes the default ...
1
vote
1answer
1k 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 ...
-1
votes
0answers
15 views

Add filter to custom fields in functions.php

I've created a custom field named "colors" that i want to put values like {R}. I have a plugin that has a function dad_clothes and at the end adds that filter in order to work in posts content: ...
0
votes
0answers
13 views

Unhook (or remove) Sidekick Customizer Option using a function

How do I remove / disable / hide the "Click for Help" Sidekick Drawer? I'm reading over the codex and I just don't see anything relevent between this and the plugin. I downloaded the plugin, start ...
-1
votes
0answers
30 views

Visual Composer - How do I modify a shortcode after page load? [on hold]

I have a grid shortcode built in Visual Composer (on a page by page basis) that I'm trying to modify after the page loads. I'm running a few regex statements to make sure it only matches what we need, ...
1
vote
1answer
967 views

Customize the “Registration complete. Please check your e-mail.” message on WP 4.0

How do we customize the "Registration complete. Please check your e-mail." message that appears when registering on WordPress 4.0? In previous versions, Dave Ross solution worked: add_filter( ...
-3
votes
1answer
23 views

Woocommerce: Only one review per verified buyer [closed]

By default, Woocommerce allows multiple reviews by a single user. What I want is to allow only one review from verified buyers.
0
votes
2answers
2k views

Filter categories using tags

I have a website with the following categories: Videos Pictures Stories And I have a lot of tags like: Funny, Awesome, Mind Blowing, Crazy, etc. Is there a way I could filter lets say: Videos ...
0
votes
1answer
575 views

Empty string supplied as input when parsing content

I have this code: <?php function mb_find_my_image( $content ) { if( is_home() ) { /* if is home start */ $dom = new domDocument; $dom->loadHTML($content); ...
0
votes
3answers
44 views

How to support multiple search terms query within one process?

For multiple search terms; ?s=hello+world Wordpress work find "hello world" like the_title , the_content posts! And, if our post title Hello Anna wordpress does not get one results! I want to ...
11
votes
4answers
11k 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.
0
votes
0answers
16 views

Get current category for post with multiple categories (custom taxonomy)

I have created a custom taxonomy for services and a custom post type of service, there are currently 6 categories within services and each post can be assigned to multiple categories. What I would ...
1
vote
3answers
70 views

Menu item added in wp_nav_menu_items filter is never highlighted

In a Twenty Thirteen child theme I append a menu item (a link to /player-number page template, where the number is different for each user and represents her or his id in a game database) using the ...
0
votes
1answer
42 views

Move a file from a directory to another

I have this function: function attachment_selectbox_edit($form_fields, $post) { $select_options = array( "no" => "No", "yes" => "Yes" ); // get the current value of our custom field ...
1
vote
0answers
30 views

Filter to shorten column content on edit-tags.php

I am trying to get the content of columns in the edit-tags.php page. I have been trying to do it, first I tried to get the columns. add_filter( 'manage_posts_columns', 'get_columns'); function ...
0
votes
0answers
22 views

How do I change the link class in paginate_links() [duplicate]

I am trying to change the link classes output by paginate_links() from prev page-numbers and next page-numbers to previous page-numbers and next page-numbers to align with our framework. I'm not quite ...
0
votes
0answers
27 views

Dynamic Multiple Taxonomy & Ajax Filtering

I am dynamically generating some taxonomies and then using the terms to create checkboxes on the frontend. I would like to filter posts depending on what is checked. If multiple checkboxes are ...
3
votes
1answer
33 views

Keep Users Logged In As Long As I Like

I'm implementing a Kiosk webapp based off WordPress and I have some conditionals which are key, they work based on whether user is logged in or not. I'm aware that after user clicks "remember me" it ...