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

learn more… | top users | synonyms (5)

-1
votes
0answers
9 views

Fantastic Elasticsearch: Filter to modify mapping [on hold]

I'm having trouble using the elasticsearch_indexer_map_field filter packaged with Fantastic Elasticsearch plugin. Docs found here I tried: function FESmapping_edit($mapping, $field){ ...
0
votes
0answers
6 views

When adding media, can I filter the HTML generated from “Insert From URL” before it hits the editor?

function test_function( $html ) { return $html . 'TEST!'; } add_filter( 'post_thumbnail_html', 'test_function', 21 ); add_filter( 'image_send_to_editor', 'test_function', 21 ); add_filter( ...
0
votes
3answers
21 views

Once redirected by Rewrite rules, how can WordPress know the page?

I have been searching for some configurations of .htaccess, filters and hooks to make able to manage the inner site uri's. The goal was force login, register and admin pages through SSL, and all the ...
0
votes
1answer
32 views

passing '&' in return function of add_filter

I have below line in my return function of add_filter in wordpress. add_filter('the_content', 'my_drama_func'); function my_drama_func () { return "function getthrough() { jQuery.ajax({ ...
0
votes
1answer
11 views

Surround uploaded image link with div

When you upload image you have smth like this <a href="http://vitya/wp-content/uploads/2014/06/8.jpg"> <img class="alignnone size-Small x Big wp-image-65" ...
0
votes
1answer
230 views

Search a title word through query_posts (not the exact match)

We're working on a database with personal data from different sportsmen such as name, height, weight, etc. We've managed to build a detailed filter through query_posts. Every filter field is working ...
0
votes
2answers
243 views

How to use the 'comments_number' filter?

I'm not sure how to use this filter. Could someone show me an example? I'm trying to change ('0', '1', '%') to ('0 Comments', '1 Comment', '% Comments'). I'm using this function to get the comments ...
0
votes
0answers
7 views

Woocomerce - Add Bank Name to the fields list in Our Bank Details [closed]

I would like to move the bank name, in this case "Standard Bank", to the details listed on the frontend and email template, instead of next to the Account Name, without hacking the class file. Im ...
0
votes
1answer
43 views

Adding a Filter to Sidbar Login Plugin to Change Login Button Lable

I'm a newbie and I have not been able to find an answer to my question. I have installed the Sidebar Login plugin and I'm trying to change the form labels, specifically,the login button label. I ...
0
votes
0answers
6 views

How to change the structure of an image attachment in a post?

I'm trying to solve a problem with the attached images in a post. Somehow the structure is not working right on a theme i'm using. Instead of showing a div with the class "wp_attachment" is just a h6 ...
1
vote
1answer
23 views

Apply the_content filter, but prevent other hooked actions

I have a plugin that displays some content onto the front end of the site after applying the_content filter to the block of text. I do this for formatting and maintaining links and images etc. When I ...
0
votes
2answers
263 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 ...
-2
votes
0answers
13 views

Events Manager filter by custom attribute [closed]

I have a problem with the events manager plugin. I want to filter with a custom attribute. The code is as below: EM_Events::output(array ( 'order' => $order, 'limit' => 4, ...
0
votes
0answers
3 views

How to set “Unattached” option as default in Media Library?

When inserting an image into a post, I want the "Unattached" filter to be the default upon opening the media library. Screenshot Any way to do this?
0
votes
1answer
26 views

Add Class to a div using a filter?

is it possible to add a dynamic class to a div using a filter in the functions.php? I know it's possible for the body-tag - also for a custom defined div with an id? if ( !is_search() ) { ...
0
votes
2answers
1k 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.
2
votes
1answer
348 views

Refine/Filter WP_Query Posts with jQuery or Ajax

I know this has been asked many many times, but I literally searched for an answer for more than 5 hours without finding anything that drives me in the right direction. What I'm trying to achieve is ...
0
votes
0answers
14 views

Role Column Sorting

I'm trying to add sorting on Role column on user listing by desc and asc but I can get it work, it always show "No matching users were found." below are my code add_filter( ...
0
votes
3answers
37 views

Show excerpt for only first post in query

I'd like to only show the excerpt for the first post in my main query. I was wondering the best way to approach this. What I have tried so far is: Making a custom homepage and using two queries, ...
6
votes
1answer
2k views

How to add sub-menu to a menu generated by wp_nav_menu by using plugin

I have a menu generated by wp_nav_menu which look like <ul class="nav-menu" id="menu-top-nav"> <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-43" ...
0
votes
1answer
19 views

Email Obfuscation: Is antispambot() Acceptable? [closed]

I've been looking into Email Obfuscation and trying to get away from obfuscation plugins when I ran across this code snippet[1]: function remove_plaintext_email($emailAddress) { $emailRegEx = ...
0
votes
3answers
41 views

Sort Posts By Category?

Googled this for hours, cannot find a solution. On my theme you have a Browse page which pulls all the videos from the Custom Post Type I am working with. If a user makes 30 categories then id like ...
0
votes
1answer
13 views

Removing filter dropdown in posts table (in this case Yoast SEO)

I don’t need Yoast SEO meta box for one post type so I removed it with remove_meta_box(). Removed unneeded columns in post table by unsetting columns with manage_edit-custom_post_columns, but drop ...
0
votes
1answer
16 views

How to add a filter to get_the_author_meta?

I need to filter calls to get_the_author_meta() but I haven't been able to do it. I'm using a plugin which uses this function: get_the_author_meta('display_name', $p->uid)` I need to be able to ...
1
vote
1answer
252 views

Filter list by a unique meta value dilemma

I'm been racking my head at this for a while now, and I can't figure out how to fix the code. Here's the issue; I found a snippet of code online to filter my post results in edit.php based on ...
1
vote
1answer
157 views

Run a filter when a walker runs

Is there any way to run a particular add_filter function whenever a specific Walker_Nav_Menu class runs? The function always needs to run when the walker goes, and I'd like them to share variables, in ...
0
votes
1answer
229 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
0answers
26 views

using ACF datepicker to filter posts on a page

i’m using a wp-query to display posts from a category on a custom post type page. it works fine, and I’ve been also abble to sort my posts depending of datepicker field called “date_debut”. my posts ...
0
votes
1answer
5 views

term_link filter gives less atributes

I have made a filter for term_link but when I work with it, I get message about not getting the second and third attr. Its a pitty, i need them add_filter('term_link','authorsongsurl',10); function ...
1
vote
1answer
2k 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
10 views

How do I adjust/remove img widths when embedding posts in a narrower external site?

I have a blog on a PHP site i.e. http://mywebsite.com/blog/ and want to embed complete posts in a page on http://mywebsite.com/ include('blog/wp-load.php'); $post=get_post($postid); ...
0
votes
0answers
38 views

Use Ajax To get posts from custom post type?

I am using isotope to show post from post type. But the problem is i have paging and i cannot filter post by using isotope, its only filter in one page, and cannot get post from other page, So, i ...
0
votes
1answer
43 views

Add Bootstrap Classes to Recent Posts Widget

I am building a site that is based on an existing theme, lawyers. I am tasked to make the recent posts widget look like the practice areas section, I would need to add some structural divs (bootstrap ...
6
votes
2answers
998 views

WordPress 3.9 - Trouble Editing new TinyMCE

With WordPress 3.9 coming soon it's bringing along TinyMCE 4.0. I'm running my plugins and functions through some testing and found that one of my functions seems broken / not working with the new ...
0
votes
1answer
14 views

WP_NAV_MENU filter targets all menus

Im trying to replace my template's primary menu through a plugin so that I don't have to make changes to the header.php. I found this code in another question answered here in 2011 (Replacing ...
0
votes
0answers
26 views

Filter Users Using Custom Admin Role

I have created a custom user role in my WordPress installation called Inactive, which identify users that don't write posts or pages anymore (This role was created for archival purposes, as a kind of ...
0
votes
1answer
452 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 ...
0
votes
2answers
657 views

category filter doesn't work in WPML

I translate the categories to another language, but in the main page, the two language categories are all displayed. How can I filter another language? My WPML version is 2.4.1. I found all the ...
1
vote
1answer
220 views

display only the wp_nav_menu, which has the current-menu-item

i have a problem displaying only the menu with wp_nav_menu, in which the current-menu-item is in. Heres what i got: function register_menus() { register_nav_menus( array( 'sidebar-menu' ...
0
votes
0answers
17 views

How to Add A Rel Filter to All Links?

How can I add a filter in the functions.php to all links tags? Basically I am needing to add a rel="tooltip" to all my anchor tags within WordPress. I appreciate the help. Thnx
0
votes
1answer
21 views

Filtering more than one term in a taxonomy in WP

i have a custom post type called 'events', it has a taxonomy named 'category' structured this way: hotels (parent) -1 star (child) -2 stars (child) -3 stars (child) location (parent) ...
1
vote
1answer
278 views

WooCommerce Custom Product Validation [closed]

I'm attempting to build a membership system in WordPress that utilizes WooCommerce with Gravity Forms and integrates with SalesForce. Can somebody give me some direction on how to properly utilize ...
0
votes
1answer
619 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 ...
2
votes
1answer
371 views

Gravity Forms field entries into wp_query loop

I have a simple function that filters the page content when form (ID 18) is submitted. It simply displays the entry of field (ID 13)... add_action("gform_after_submission_18", "set_post_content", 10, ...
1
vote
2answers
249 views

WooCommerce product search titles only

I had asked this earlier and solved it using the Relevanssi plugin, however that plugin is now breaking things so I can't use it anymore. How is something so freaking simple made so impossible by ...
0
votes
0answers
22 views

Wordpress Unit Testing cleaning up hooks and filters

Using Wordpress' unit testing suite has been going quite well, and it's nice the WP_UnitTestCase takes care of cleaning up table data after each unit test. But one thing that doesn't seem to be ...
0
votes
1answer
38 views

Custom view counts not updating correctly

I'm trying to add some custom views/filters to the list of posts for a custom post type in the admin. However, the query that counts the number of posts is updating the number of posts for all filters ...
0
votes
0answers
35 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 ...
0
votes
1answer
14 views

Filter on widget-title does not work with custom links

I added a filter to my widget titles and it looks like the filter doesn't apply on links, which are created with the links-sidebar. It does work perfectly on the blogroll or search widget Here's a ...
0
votes
1answer
23 views

Print all inline styles to head

Currently working on a project here http://palanquin.shrimp-works.com. When I try to validate what I have done so far, using http://validator.w3.org/, I get lots of this error Element style not ...