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

learn more… | top users | synonyms (5)

1
vote
0answers
21 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', ...
0
votes
0answers
48 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
17 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
25 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
495 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
27 views

use add filter of third party plugin not going right

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' => ...
0
votes
1answer
12 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
7 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
12 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
13 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
8 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
20 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
134 views

woocommerce change currency per category [on hold]

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
23 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
893 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
14 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
12 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
28 views

Visual Composer - How do I modify a shortcode after page load?

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
954 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
21 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
569 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
41 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
66 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
26 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
32 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 ...
1
vote
1answer
18 views

Multiple filters for wp_get_archive

I need to display custom posts archives on a page in the following format: Monthly - Grouped by Month for the Current Year. Annually - Grouped by Year & Month for all previous years So I have ...
2
votes
1answer
822 views

SSL certificate for the host could not be verified

I'm getting this error in a log file created by WooCommerce "The SSL certificate for the host could not be verified." The error is being generated by WordPress' file /wp-includes/class-http.php ...
1
vote
1answer
15 views

how to disable default menu classes

i want to disable default menu class, bellow code is disable menu class completely. add_theme_support( 'menus' ); add_filter('nav_menu_css_class', 'my_css_attributes_filter', 10, 1); ...
1
vote
1answer
772 views

Using add_filter() in Widgets

Just have a query reference the add_filter() function. Can you use this function inside a WordPress widget class. Example I have a widget with dynamic created code that I want to pass to another ...
0
votes
1answer
23 views

Hide a specific post from Archive Feed

I want to remove a custom post type post from it's archive feed only. But keep in the main feed. Like is I have 1) main feed: myexample/feed 2) Custom post type Archive Feed: ...
0
votes
0answers
18 views

Filtering title in BuddyPress

I'm working on filtering titles for BuddyPress pages (specifically, Groups and Group Forums). I'm having some trouble so maybe someone can point me in the right direction Since 4.1, WordPress has ...
0
votes
2answers
46 views

Filter and validate user role in registration

I want to show a select box for user roles in the registration form. I am using this model: /* ROLES IN LIST REGISTRATION */ // 1. Add a new form element... add_action( 'register_form', ...
1
vote
1answer
19 views

Add Sortable Column For All Post Types

I am creating a hit counter that counts the number of page views across all post types. I have gotten it to work and the column displays for each post type showing the total number of page views. I ...
0
votes
1answer
29 views

Highlight a Post on archive page if it has a new comment?

I have been searching for a solution to highlight a post if it has a new comment but there is no plugin/forum answer about this. Basically I have a custom post type listings on a page. I want to add ...
1
vote
1answer
3k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
0
votes
0answers
15 views

Adding Taxonomies Dynamically and Removing Unwanted One

My overall goal is to create taxonomies dynamically in the admin, then use those to filter results on the frontend. I have an options page setup with ACF with a repeater inside that I use to create ...
0
votes
2answers
625 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 ...