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

learn more… | top users | synonyms (5)

0
votes
1answer
35 views

shortcode function outputs multiple anchor tags

I have a shortcode function which displays the latest news, the code for a news item is as follows: $html .= '<div class="latest-news">'; $html .= '<a href="' . get_permalink($recent["ID"]) ...
3
votes
2answers
83 views

Filter by custom field in custom post type on admin page

I've used Advanced Custom Fields to create custom fields for Competition name, answers etc. I've made a custom post type for competitions as shown on the image and I used Wordpress functions.php to ...
1
vote
0answers
43 views

Prevent 404 when using pre_get_posts to filter an archive page

I have added a custom taxonomy named "area" to the default "post" post type. It's meant to organize posts by geographical area. In category pages I've added a dropdown that allows the user to filter ...
1
vote
0answers
20 views

Filtering posts by user role [closed]

I have created some custom roles in my Wordpress installation. Now I want to filter the posts they can see and edit based on a custom field criteria. How can I define this behavior in a custom user ...
1
vote
1answer
23 views

How do I add a checkmark to my-sites save settings hook

I want to add a checkmark to the my-sites.php through a hook and then press save settings and have it do a function that executes a SQL query. I've added the checkmark but I don't know how to go ...
2
votes
1answer
58 views

Removing labels and <br> tag on WordPress's default login form

I am customizing the login form to more closely resemble Google's minimalist form, which has no form labels, and instead relies on placeholders to prompt users for the input fields. The form starts ...
0
votes
1answer
34 views

Adding html banner to posts

I'm writing a plugin that adds a banner to the top of all blog posts. I'm using the_content filter and just pre-pending some html to it. When doing this, the html isn't shown in the excerpt, but I ...
0
votes
0answers
20 views

add_filter priority not working

I have a must use plugin that adds the featured image to a post. I do this by prepending the featured image to $the_content through the use of: add_filter('the_content', 'featured_image_function', 1) ...
0
votes
0answers
19 views

Dynamic Search without needing to reload the webpage

I'm wondering how can I customize a dynamic search filter for my Download page. I'd like it to respond real-time as soon as I type something, and as far as I know AngularJS provides that. Is there any ...
0
votes
0answers
7 views

WooCommerce cart notices as single concat string

So currently WC displays cart notices by looping through an array, making for a kind of ugly list at the top of the cart when the user forgot multiple required fields. I would like to filter this ...
4
votes
2answers
44 views

syntax for remove_filter in parent theme with class

I'm trying to remove a filter on the register_url hook a parent theme added, that seems to have a class nomenclature I can't figure out. Ordinarily, a filter for this hook would be easily added like ...
0
votes
0answers
6 views

Add current user filter on WordPress's default celendar

I want the WordPress default calendar to only show the posts from the current logged-in user. Not the entire posts of the site. I had to hack the general-template.php to do that but really need to ...
0
votes
0answers
18 views

Create plugin to modify custom field values

I've developed a plugin which outputs a list of events into a widget. To display event details I created a generic page with shortcodes and the plugin populates shortcodes with event details. This ...
0
votes
0answers
18 views

Adding a taxonomy filter

I'm am attempting to add a custom taxonomy filter. I have partially achieved this, I have a dropdown menu that displays all of the desired terms. However when I actually attempt to filter on these ...
0
votes
1answer
40 views

Modify page title and subtitle with a plugin

How can I build a plugin which will modify a title (header) of the page? I built one generic page which uses shortcodes to display relevant information based on url parameters, but I can't use ...
0
votes
0answers
15 views

How to, post-formats & category in link (permalinks)

For permalinks a combination of both. Simple: "e.g./type/status/category/general" -> return 404 or permutation, "e.g./category/genral/type/status" -> return 404 Do not working -How to i ...
1
vote
1answer
5 views

Admin Posts Table Column Fitlering is not working for Custom Post Type

I have lot of posts in my custom post type. I want to filter it when I click on my post category. as like the following image. Here is my code to add it on click links. function ...
0
votes
0answers
75 views

Pagination for ajax category filter

I created an AJAX category filter for a custom post type with custom taxonomy. 1)It's working but can't figure out how to add pagination for the custom taxonomy once it filters. When I click on ...
0
votes
1answer
38 views

Passing variable in hooks and filter

I was trying to pass variables in filtes. This works perfectly for me. class my_class { function my_class() { add_filter('wp_list_categories', array(&$this,'cat_count_span')); } function ...
0
votes
1answer
22 views

Wordpress user account activation

How to implement user account activation in WordPress, it's not a multi-site. Once user registered through site or admin panel, user should get an email with activation link. Once the link opened ...
0
votes
1answer
33 views

Using preg_replace() with the_content filter

I am trying to append a php query to the end of links from my website to a sponsor site using the_content filter and preg_replace(). I have tested my regex expression on regexr.com and it works also ...
0
votes
0answers
7 views

Custom internal search posts based on location and category

I have the next function in wordpress wich search in DB after if (isset($_GET['where'])) $metrodir_search_location = $_GET['where']; else $metrodir_search_location = 'Pitesti'; if ...
0
votes
0answers
26 views

Use data-id for wordpress posts (individually)

I get the filters script implemented on my wordpress web by some developer, who's not good in wordpress functions but he did implement the filter script on web. That script is working on projects ...
5
votes
1answer
230 views

Query WP REST API v2 by multiple meta keys

Using v2 of the REST API, I'm wanting to query some posts by multiple meta keys. With v1 I was able to format the url like &filter[meta_value][month]=12&[meta_value][year]=2015 and it worked ...
2
votes
3answers
45 views

Getting my head round WordPress filter

I am following a tutorial that will hopefully allow me to insert templates straight from my plugin into WordPress. I am using the template_include filter, I can't get my head around how the whole ...
0
votes
0answers
36 views

Restrict access to custom post type and filter from every query

I created a custom post type topic which is just for internal use. I managed to assign the correct capabilities so that users of certain roles can edit/publish/delete posts. Now I want to redirect ...
0
votes
0answers
21 views

Woocommerce: filter related products

I have a custom field created for products named 'expiration_date' and need to filter out when past its date specified. I found how to do this for the shop with the following code, works well: ...
0
votes
1answer
66 views

Filters post in admin with dropdown select, custom post type

I'm trying to filter my post in my admin area with a custom filter dropdown. I use this method to make it: http://wordpress.stackexchange.com/a/45447/84541 Here is my code: add_action( ...
0
votes
0answers
9 views

Filter paginated post

I'm tring to build a directory of clinics. I'm already able to search by location and treatment, filter results (clinics) by services (wi-fi, parcking, ...) and paginate them. ...
0
votes
1answer
22 views

`authenticate` filter never gets called

I've added and network activated a plugin with this code: add_filter('authenticate', 'my_authenticate', 1000, 2); function my_authenticate($user, $username){ // We never arrive in this function ...
0
votes
1answer
21 views

Customize title, description and focused keyword [closed]

I would like to customize focused keyword, SEO title and meta description, but I am unable to find any clue how to do it. There is official documentation but it is sooo lacking... I came up with ...
0
votes
0answers
46 views

How to filter woocommerce order with category

I want to filter orders by category of products, what I have tried based on research is : $filters = array( 'post_status' => 'any', 'post_type' => 'shop_order', 'posts_per_page' => 200, ...
3
votes
1answer
40 views

Ignore a filter on the media library

As per my question yesterday, I need to exclude all images from most of my WordPress queries - yesterday, I thought I needed to exclude them from all queries, until I came upon the following issue. ...
2
votes
1answer
44 views

Error when overriding only some audio shortcode HTML output

Context I have a function that overrides audio shortcode HTML rendering, thanks to a WordPress hook: wp_audio_shortcode_override I used it this way in an OOP plugin: add_filter( ...
0
votes
0answers
21 views

woocommerce_get_country_locale hook not working

I am trying to override the "woocommerce_get_country_locale" hook in many ways, why its need mean? I need to remove the state field for particular country! Shown below are what I tried? Attempt 1 ...
0
votes
1answer
34 views

Retrieve a custom form field modified by a filter

I use a 3rd party plugin that creates a form with some fields. I want to use one of these fields in one of my templates. Is there a way to do this? UPDATE I found a solution, see the accepted ...
0
votes
0answers
25 views

Change name of Register link

How can I change the name "Register" to "Signup" in my site? add_filter( 'register', 'change_register' ); function change_register( $link ) { $link = str_replace( "Register", "Signup", $link ); ...
0
votes
1answer
20 views

Converting restricted html in comments to bbcode

Problem: Wordpress multisite only allows the Admin account to include images in html for security reasons. It is possible to install a plugin that turns off these restrictions, but it apparently opens ...
0
votes
0answers
13 views

Is there any hooks or filters to detect an action after user upload video to AWS (Amazon Web Service)?

I am using the plug-in AWS and offloads3 to upload video to AWS, however, I would like to find a hook or filter to detect a state when after user uploaded video/image successfully to Amazon web ...
0
votes
0answers
30 views

What is the simplest way to allow users to narrow down their search for adoptable animals?

I am working on a website for a animal rescue/shelter. I would like to allow users to narrow down their search through the many dogs and cats, by for example setting a filter for only "big" dogs, or ...
0
votes
1answer
26 views

Is it possible to filter the main loop to exclude posts from a specific category?

The question is the same as the title. I'm talking about the default loop on the blog page / home page. I am using a network blog and must apply it to all blogs.
0
votes
0answers
14 views

Hooks after media is saved

Is there any hooks/filters that fires when user already uploaded image/video . Thank you
0
votes
1answer
45 views

Filter existing hook using parameter and foreach loop

I am trying to create a filter to add a custom column to the edit page of any custom category that might exist in Wordpress. I am aware that the filter hook must be in the form, ...
0
votes
1answer
95 views

Genesis filterable portfolio isotope [closed]

I've this working genesis filterable portfolio and I want to share with You. I was inspired by It works at any level of tax you are and show only the immediate child-terms to filter (like you can ...
0
votes
0answers
10 views

Overriding Customizer setting value by url parameter value

Is it possible to override a specific setting of Customizer based on url parameter? For example, I have a setting main_layout which has values like left_sidebar, right_sidebar and full_width. The ...
0
votes
3answers
88 views

Add review box by function at top or bottom of content

Filter add_filter( 'the_content', 'sandy_posts_filter' ); function sandy_posts_filter( $content ) { global $post; $review_box_pos =get_post_meta( $post->ID, ...
1
vote
1answer
26 views

customizing the_password_form filter

I'm trying to customize the_password_form to integrate it with bootstrap inline-forms with an add_filter() function: function custom_passowrd_form ( $form ) { global $post; $label = 'pwbox-'.( empty( ...
0
votes
0answers
21 views

How to integrate a code through function

so I'm having this big issue with replacing a code with another via function. I just copy pasted an example code from the plugin developer which at the moment is unable to assist me. This is the code ...
0
votes
2answers
42 views

Adding multiple taxonomy filters to functions.php

I need to add multiple taxonomy filters to the functions.php file to remove (3) irrelevant taxonomies from the Yoast SEO sitemap index. I have been able to successfully add one filter, but when I add ...
0
votes
2answers
54 views

How to manipulate wordpress template tags' output

take the_category() as an example: Here is the output of the_category function in the wordpress loop: <ul class="post-categories"> <li> <a ...