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

learn more… | top users | synonyms (5)

0
votes
0answers
10 views

Filter meta data for simple and variable products on custom query

I have a custom query loop on a page using WP_Query and I want to filter by certain meta keys _price, _weight, _width, _height, _length, total_sales. I am able to get this working with both simple ...
1
vote
0answers
12 views

Custom filter function not working with Custom post type

I have custom post type "soto_property". I have made a custom filter to filter post listing according to used meta data named "operations". Here is my code- <?php add_filter( 'parse_query', ...
2
votes
0answers
25 views

How to make a widget expand wider than the column width when editing its settings in the admin

The WordPress Text widget expands horizontally beyond the margin of the sidebar when added to a sidebar and opened in the admin and I am trying to apply that function to a widget. I see inline css is ...
0
votes
1answer
11 views

How to add filter for wordpress plugin?

I have a really newbie question, but I'm really new to WordPress development. In the plugin that I'm using is using this filter. if ( true === apply_filters( 'some_custom_filter', false ) ) { ...
0
votes
1answer
13 views

How to replace all images in all posts and pages with a different size?

I'm about to reboot an old blog of mine and therefor I'm creating a new theme from scratch. Before I'd align pictures left and right, because it seemed good. But now I want to make it much cleaner and ...
3
votes
0answers
24 views

How to add taxonomy filter on the query fly?

I try to add tax query on pre_get_posts hook using following code : // Add custom posts to main query (archive and home) add_action( 'pre_get_posts', 'add_post_types_to_query' ); function ...
0
votes
0answers
21 views

Add_filter to Gravity forms: How? [on hold]

So, there is a function in Gravity forms that automatically skips the classname of every 10th checkbox, as a hack so that 5.1 doesn't conflict with 5.10 (according to common.php). I want to change ...
0
votes
0answers
20 views

How to get all the predefined do_action() calls from an active theme

To hook my plugin content into anywhere, suppose I offered the theme developers to create their own hooks with a prefix (pre_) anywhere in their theme - the rest of the hook is unknown to me. So what ...
0
votes
0answers
15 views

Avoid changing menu query with suppress_filters => false

I recently had to change qTranslate for qTranslate X since the former is not being updated. This broke my menu and after searching I found it was because qTranslate X sets suppress_filters to false. ...
0
votes
0answers
12 views

Execute php script instead of downloading WooCommerce product file [closed]

I use WooCommerce with Wordpress and want the user to be able to download virtual downloadable pdf files after the bought it (going to their 'my account' page). I know this is already implemented in ...
1
vote
1answer
23 views

Get posts with at least one category in common with current post?

In single.php : I want to get all posts with at least one category in common with the current post. I tried reading through the wordpress codex documentation but I found it rather confusing (I'm ...
-1
votes
0answers
16 views

WooCommerce Layered Nav Filter Displays wrong count [closed]

When I use the WooCommerce Layered Nav Filter, it displays the wrong count. If you take a look at my site, the Mazda filter show's a count of 1, but when you click on the filter, there are actually ...
0
votes
1answer
8 views

Display child pages on homepage template

I thought this would be a simple case of following the Codex but apparently not. I'm trying to display child pages of a particular page on my homepage using a custom made template. So far I've managed ...
0
votes
1answer
38 views

Woocommerce Price Text

I'm trying to show after the price of my product, whether the price is 'per person' or 'per group'. I've created a custom field for both, so for example, if custom field 'price_per_person' is ticked, ...
0
votes
1answer
30 views

what is do_action(); in wordpress? [duplicate]

Sorry for making duplicate Topic but it is very important to me because i don't understand this topic by looking other related topics. Actually i am in process to build a WordPress theme and i am ...
0
votes
1answer
27 views

How do i get all author posts on custom post type list

I am trying to filter a custom post type by some custom fields value and if the posts are by author, query for 2 custom field works but author posts doesn't work. Thanks! add_filter( 'parse_query', ...
0
votes
1answer
37 views

add_filter does not work as expected

I have a wordpress plugin where i included this (with some changes) $fep_files = array( 'first' => 'first.php', 'second' => 'second.php' ); $fep_files = apply_filters('include_files', ...
0
votes
0answers
13 views

How to filter displayed posts like what we can see on products page

I wanna know if there is a way to filter displaying post on clicking on menu or a link. I know that there is some ways for admin post list, but i want it for front pages. I think we can do that by ...
0
votes
1answer
26 views

remove_action not removing add_action from constructor

I am trying to replace a message from a function that got hooked in a constructor from a class from woocommerce. This is what I tried to remove the message: What I tried. function remove_actions() ...
0
votes
0answers
11 views

Click on link to filter displayed posts like what we can see on products page

**I wanna know if there is a way to filter displaying post on clicking on menu or a link. I know that there is some ways for admin post list, but i want it for front pages. I think we can do that ...
0
votes
1answer
15 views

Custom filters inside a specific category?

I have different categories that require different filters For example a 'training' can be about a specific bodypart, by a specific athlete,.. What I want is something like this: But different ...
0
votes
1answer
35 views

Filter keywords from search query

I have search over the google, somewhere out there and here(http://wordpress.stackexchange.com). But, i can't seem to get the solution i was looking for. I would like to ask that, is there any ...
0
votes
0answers
19 views

add_filter('body_class') running from widget even when widget is not loaded on page/post

This should be adding a function to init() to check if the widget is active widget on the front end on a page/post - but even when the widget is not loaded on a page/post, .Widget_FilterProject is ...
0
votes
0answers
11 views

Filter displaying posts

I wanna know if there is a way to filter displaying post on clicking on menu or a link. I know that there is some ways for admin post list, but i want it for front pages. I think we can do that by ...
0
votes
0answers
16 views

Adding 'query_vars' filter redirects to the latest posts page

On our main page we tried to use an additional query parameter to keep in session and use later. Instead of browsing www.example.com/mywp, the user is now browsing www.example.com/mywp?param=value and ...
0
votes
0answers
6 views

Why WordPress attachments LINK TO settings are not working?

Using this code below, I added some on-hover share icons for all images of the content. But, now these images are not getting any "Link To" setting from authors. I don't know what is the problem. Can ...
0
votes
1answer
23 views

Custom display for homepage, tag and author pages

I need to have pages where the first post on the page has a special format. I've figured out how to modify loop-home.php to get the result I want outputted on the homepage. I want to have the same ...
0
votes
0answers
29 views

Custom Post Type and Taxonomies

I hope someone here can help me with a bit of a problem. I am working on a WP site where I have created a Custom Post Type called Retailer. In there I have three taxonomies Country, Region and City ...
0
votes
0answers
8 views

Journaling… Problem with comment duplication checks

This may be more of a request for advice than anything... I want to add a Journaling function into my plugin whereby all actions are logged. My initial thought was to use comments as it seemed to be ...
0
votes
1answer
20 views

How to use the filter 'widget_text' to a particular text widget with id

I have a sidebar with 10+ text widgets serving advertisements. Now I want to filter a particular text widget in a single post if that post has a data in meta field. I searched a lot and found Is There ...
0
votes
0answers
19 views

How to filter between two menu items

Right now my menu is something like this: <ul> <li><a href="#">item 1</a></li> <li><a href="#">item 2</a></li> <li><a href="#">item ...
-1
votes
1answer
29 views

From child theme remove class which is added by parent theme?

So the parent theme adds masonry in the body class by function water_lily_body_class( $classes ) { if ( !is_singular() && !is_404() && !is_author() ) $classes[] = ...
0
votes
0answers
11 views

How to use remove_filter if filter declared in a class? [duplicate]

I have a 3rd party plugin that declares a filter that i want to fully replace. The problem is there is no class variable to call upon. From the codex: global $my_class; remove_filter( 'the_content', ...
0
votes
0answers
10 views

Why are the terms of Product attributes in the table wp_term_taxonomy showing a count of 0?

im installing a plugin called Woocommerce Product Filters which is a filter system for products as its name may suggest. THe problem im having is when I turn on a number of attributes to filter by, ...
0
votes
0answers
19 views

Search Authors, Filter by custom taxonomies in their posts?

I have a website where users will post their past jobs (custom post type) and choose attributes (custom taxonomies) to describe the type of job and responsibilities. I would like to be able to search ...
0
votes
1answer
34 views

How to filter posts in admin by before date or by post status 'future'?

I have read/searched a ton of questions but all I find seem to be related to custom post types and such. The situation is that sometimes we happen to have a lot of posts waiting for to be published ...
1
vote
2answers
23 views

how to change appearence of the content of default post list columns?

Speaking about backoffice here. I usually add columns and filters to the backoffice for certain custom post types. No problem here. BUt what if I would simply like to change something on the content ...
1
vote
1answer
35 views

Adding custom column to comments admin panel?

How do I add a new custom column to wordpress wp-admin/edit-comments.php page ? I tried this but did not work. add_filter( 'manage_comments_custom_column', 'add_new_columns' ); function ...
0
votes
0answers
22 views

Limit Taxonomy Parents

I've got a custom taxonomy set up as hierarchical, with a custom function to limit the number of categories the user can select to one. I also need to limit the depth that this custom taxonomy can ...
0
votes
1answer
18 views

Trying to get property of non-object in shortocde

I'm having error in shortcode that "Trying to get property of non-object" on line no 130 Here is code: while ( $our_work->have_posts() ) { $our_work->the_post(); $termsArray = ...
1
vote
1answer
23 views

Insert other menus as submenus of a main menu

I have a main menu which features items for each of my service cpts. Each of those cpts has another menu associated with it, the id of which I grab using the ACF get_field function. What I'm trying ...
0
votes
1answer
36 views

Problem in outputting shortcode

This is my 2nd question about shortcode as I'm learning shortcode. Here is my code: add_shortcode('work-shortcode', 'work_shortcode'); function work_shortcode() { $return_string .= '<div ...
1
vote
2answers
40 views

Filtering Comment Reply Links (comment_reply_link_args) for “infinite replies” in nested comments

Since 4.1, WordPress has made the filter "comment_reply_link_args" available, apparently (?) with the intention of letting us intercept and modify particular options normally set in the admin panel as ...
0
votes
1answer
33 views

Replace image scr with it's surrounding href

I'm trying to add a filter to the content to replace the src of all images in the content with it's surrounding href link. Any ideas how to go about this? The only thread I could find that came close ...
2
votes
1answer
42 views

Filter media library items by size

I want to prevent users from being able to set a Featured Image from the media library if its width is less than 100px. Originally I thought to use the ajax_query_attachments_args filter, but it ...
0
votes
1answer
36 views

Run posts_where and posts_join only on the main query

Using the pre_get_posts hook, I'm able to take $query as an argument. But on posts_where and posts_join hook, I receive the respective clauses and not the query. The problem is that the hook is ...
0
votes
1answer
31 views

Filtering by multiple conditions in the loop

I'm trying to filter the posts in my index by multiple conditions. So far I've tried with this: <?php $query = new WP_Query( array( "post__not_in" =>get_option("sticky_posts"), ...
0
votes
1answer
42 views

Filtering the_content, but still need to display the unfiltered content inside filter

I'm working on a plugin that creates and displays Custom Post Types. I'm using ACF for additional fields. Problem comes when I need to add the actual content into the filter. There's a slideshow in ...
0
votes
0answers
19 views

How might one programmatically set the link for all images in all posts?

Every post on my Wordpress site contains at least one image (in the content, not as an attachment). Each post also contains a custom field with a URL. I'd like to programmatically modify all posts ...
0
votes
2answers
43 views

Avoid user registrations with specific email provider

I have been under a spam attack, someone is creating a lot of users daily, it could be a bot, all those users have the same email provider, is there any way in which I can avoid that anyone creates a ...