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

learn more… | top users | synonyms (5)

1
vote
0answers
94 views

How to find the hook(s) that make site slow

I am working on a site and it is working fine except one thing that it is very slow. I tried to figure out that which plugin or theme is creating the problem and find out that woocommerce-subscription ...
1
vote
0answers
20 views

HTML and custom field variable, inside variable

I'm trying to get data from a custom field and then passing that into a variable which is then used to perform a function which is - adding the tweet in the body of the_content(); This code was ...
1
vote
0answers
23 views

the_content filter on some post types only not working

I'm using a filter on the_content to insert an ad after the first paragraph of a post and it is working fine. But I'm also using a plugin called Live Blogging Plus and it uses a post type called ...
1
vote
1answer
31 views

Get categories with posts by custom field value

I have a big categories tree (~2000 total subcategories)... And I have a lot of posts with custom field "city" (different values). I have created filter posts by "city" field. But I have problem with ...
1
vote
1answer
36 views

WP_Query with different postmeta filter for each categories

Let's say I have categories (cat1, cat2) and I have postmeta keys (date1, date2, status). How do I view all posts in all categories with these filters: For cat1, I want to apply WHERE date2 <= $...
1
vote
0answers
68 views

How to Add Class or ID to a WooCommerce Layered Nav Widget

I'm looking to modify the class/id of a WooCommerce Layered Nav widget by adding in a new class or ID if the widget is displaying for a WooCommerce attribute (ex. Sizes, Colors attribute). Is there ...
2
votes
1answer
51 views

IF Statement in Wordpress

I can't seem how to correctly use the php if statemnt in my add filter function below. This code works perfectly if all (3) of my $_POST inputs have values however it has a fatal error if any are ...
1
vote
0answers
24 views

Process all virtual sub pages on parent page

My parent page: http://example.com/id Virtual pages are: http://example.com/id/1563 http://example.com/id/john/5896 http://example.com/id/jack-miami/3054 I use shortcode in parent page that gets ...
2
votes
1answer
112 views

Check if page parent has certain template

I want to check if a page has a parent with a certain page template attached to it. If I know that I can determine which scripts to load or not. Normally I would just get the page template and if it ...
1
vote
0answers
15 views

Building a request processor for multi-page forms, etc using $_GET requests

Good day, What I'm trying to accomplish in a semi-elegant way today is building a multi-step form type thing. Essentially, I'm trying to rewrite the page based on a $_GET request. Like, say, it's /...
1
vote
0answers
107 views

How to use jPList with search results

I've been working on a real estate site and looking for a way to refine search results page + update pagination, instantly, like the big name sites (ie hotpads.com, trulia.com, hotels.com, etc.). ...
2
votes
1answer
25 views

failed to filter hook `get_terms_defaults`

I've failed to filter hook get_terms_defaults, I got this notices and it won't to load any term Notice: Undefined index: number in /var/www/html/wp-merwaa/wp-includes/taxonomy.php on line 1123 ...
1
vote
0answers
43 views

wp_upload_bits Upload Specific Sizes Only

For images uploaded using this code, I want to only upload the full-size image and the thumbnail (whereas for images uploaded through site, I want all sizes). However, I can't figure out how to make ...
0
votes
0answers
50 views

Woocommerce product option redirect to other product

I'm looking for a solution in woocommerce in a gateway that doesn't accept variable products. =( I have 3 products. Each one has 2 sets of 3 options So in product A: Option 1 - A | B | C Option 2 - ...
0
votes
0answers
20 views

How to remove the function hooked to action within a class [duplicate]

I want to remove the function listify_single_job_listing_meta which is hooked in action inside the following class class Listify_WP_Job_Manager_Template extends listify_Integration { public ...
0
votes
1answer
49 views

wordpress filtering out caps in wp_title? (UpperCase is changed to Uppercase)

Have been working with WP for years, but never noticed this until today: I have just launched a new site for a customer, and they write their name like this: "ClientName" (with one letter capitalized ...
0
votes
1answer
43 views

What problems could happen if I replaced add_filter and add_action with the function calling

I'm new to WordPress, and to learn more about how to build WordPress themes, I'm now analyzing the code of a theme I downloaded and trying to make some changes in it. Two of the built-in functions in ...
1
vote
0answers
28 views

add_action shortcut?

I think in PHP 5.4 or above (don't remember the exact version), instead of writing: function some_function() { } add_action( 'init', 'some_function' ); One can pass an anonymous function: ...
0
votes
0answers
37 views

Jetpack filter hook for twitter publicize post

I would like to know whether is there any filter hook in jetpack plugin which gets called before post get published on twitter through jetpack using publicize feature. I browsed many times, but I ...
5
votes
2answers
159 views

How to list some posts first in the loop based on post id

I have a query for to display some posts . $args = array( 'post_type' =>'products' 'posts_per_page'=> 12, 'orderby' => 'meta_value_num', 'meta_key' => '_price', ...
0
votes
0answers
16 views

Web User Selects Image Category

I'm trying to build a website in wordpress where the user of the webpage can select an image category that they want to see (e.g. all images of boats). The user will have a dropdown list or some other ...
4
votes
2answers
134 views

Change “You are now logged out” text

I want to wrap <strong></strong> around the words "logged out": add_filter( 'gettext', 'wpse17709_gettext', 10, 2 ); function wpse17709_gettext( $custom_translation, $login_texts ) { ...
1
vote
0answers
33 views

I want to add a localization feature (region-specific posts) to my site, but how?

All of my users register for the site and therefore have author pages. I have language settings that they can set from that page. I'd like to add an option for them to select which province they're in....
1
vote
1answer
95 views

How to add a class to Tag cloud widget link?

I am currently trying to add styles to the links in the Tag Cloud Widget which I can see uses wp_tag_cloud() to output the cloud itself. The args in wp_tag_cloud() don't include a classname which is ...
2
votes
1answer
41 views

Limit filter upgrader_post_install to a single plugin

I am using the following filter to run a function that generates a CSS file after a plugin gets updated. Currently the CSS gets generated when any plugin gets updated. Is there a simple way to limit ...
0
votes
1answer
50 views

Dynamically adding filters

I have a function that I'm trying to get an array in it to use in a callback to dynamically add filters. Here is the function that I need to retrieve the array keys from ( in the $classes variable ): ...
0
votes
1answer
30 views

when use function the_content break

i use the function below to show content under the_content. It works on pages which uses template-test.php. But on other pages the_content stops output. function beschreibung_kriterien( $content ) { ...
0
votes
1answer
49 views

How to check which submission button was clicked?

So I added a new submission button to the edit page: Using the post_submitbox_misc_actions hook with the submit_button($text, $type, $name); function. I wanted to modify the data that's saved based ...
0
votes
1answer
218 views

How remove woocommerce title on category page only by PHP

How to remove woocommerce title on category pages only (by PHP) and keep rest of titles (on search result page for example) visible? thx
0
votes
0answers
60 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
33 views

Keeping the previous get value and add another value when submitted

I'm a super noob, so I'll try my best to explain. I have a blog page that I wanted filtered by category and I want the user to able to click on multiple categories and it will filter to show those ...
0
votes
1answer
34 views

Filter page title (displayed in browser tab) of wp-login

For wp-login.php, the default page title, as displayed in the browser tab, is "Log In". I need to change this value using a filter in functions.php. Every solution I've read addresses the header ...
0
votes
1answer
60 views

How to get the postID inside 'content_save_pre'? Other hook?

I need to get the current PostID. I think in the function the postID is not existing yet. (Because save pre ...) add_filter('content_save_pre', 'getImageUrlOutOfContent', 10, 1); Am I right? How I ...
0
votes
0answers
41 views

Filter by custom field - dropdown POST not working

I have a custom field "carbz" which has a number value. I am trying to give users a dropdown to select a number and then filter my posts based on the user's input. The current result is returning all ...
0
votes
0answers
76 views

Multiple taxonomies in URL filter (both AND and OR type)

I'm working on a webshop that's running on Wordpress+Woocommerce. I can't find a way to filter the products via URL by custom taxonomies with the OR operator. Filtering with the AND operator works ...
0
votes
1answer
106 views

WooCommerce: Add Payment Gateway Field to Webhooks [closed]

I have created a custom Payment Gateway for a special EFT system we have setup. The Bank Account and Routing Number are supposed to get encrypted then sent to a Salesforce via the WooCommerce webhooks ...
0
votes
0answers
51 views

My Wordpress url has ?c=6d1368cfbaef at the end

I am new to WP. I am currently building a WP woocommerce website using the theme Envato Bookstore. Active plugins installed: Header and Footer LayerSlider WP PDF Product Catalog 2 (BETA7) for ...
6
votes
1answer
296 views

wp_headers vs send_headers. When to use each?

I've seen wp_headers and send_headers both used before for the same thing and I'm wondering how you're suppose to know which one to use and when... On the send_headers codex page there's an example ...
1
vote
0answers
100 views

ajax category filter

I know this is a big ask for you guys, but i can't seem to figure this out. I found this page : http://www.bobz.co/ajax-filter-posts-tag/#comment-28112 it shows how to make a dynamic filter for post ...
0
votes
0answers
21 views

Filter question list on substring of metavalue

On the admin page I want to filter posts based on meta values. I know using the pre_get_posts hook will allow me to filter based on specific meta values, however I want to filter on a certain ...
0
votes
1answer
187 views

Filter By Category Dropdown List With Custom Taxonomies

I have next category dropdown filter that atm supports only two levels "parent -> Child" and I want to get the third "parent -> child -> child". I have two functions: function ...
1
vote
1answer
178 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 ...
0
votes
1answer
57 views

Translate custom order status through a filter?

I'm using this plugin to customize order statuses in Woocommerce: Woocommerce Order Status Manager In documentation it says I translate order status name using the following filter: ...
3
votes
4answers
1k views

How to filter users on admin users page by custom meta field?

The Problem WP appears to remove the value of my query variable before it gets used to filter the list of users. My Code This function adds a custom column to my Users table on /wp-admin/users.php: ...
-2
votes
1answer
46 views

Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]

Hi is it possible to make an extra field in backend, when orders are selected and marked as shipped then an extra field come and where i can select drivers who are responsible for this shipped order ....
0
votes
1answer
59 views

How to stop wrapping comments in P tag

When I update a comment in wordpress, the comment is wrapped with p tag. Here's my code remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); remove_filter( '...
4
votes
1answer
72 views

WP_Query - filter or directly?

The count of my files, templates, scripts, queries etc is getting big and I need a good system to maintain it all. I've tried to keep everything organized: No <script> tags in templates ...
0
votes
0answers
20 views

How to add new tab and data in Wordpress Users section

I have to add new tab and new data in wordpress users. Please see the image below. The points tab came from the plugin mycred but i don't know what was used. What I think was it was done using: $...
4
votes
2answers
104 views

Using variable from one filter in another filter

I have a filter for the Gallery Shortcode where I grab IDs for images used in a post and using the IDs I grab their meta data. Now I need a way to use the $copyright variable in a filter for grabbing ...
0
votes
1answer
41 views

Help me filter get_adjacent_post

I'm not keen on private posts interspersed with published posts on the front end, so I'm writing a plugin that seeks to segregate and separate them out. As part of this I want to modify the post ...