0
votes
0answers
14 views

Custom the_content filter?

I have written a plugin which uses a WYSIWYG editor to output a custom success or error message that the user can specify. HTML is allowed within the WYSIWYG editor, and I have used the_content ...
0
votes
1answer
37 views

Pre_Get_Posts order DESC not registering

I've created a filter function to filter a post type items by it's meta value _item_price. The problem is that it only works in Ascending Order and I'm not sure why. My pre_get_posts function looks ...
0
votes
0answers
30 views

Wordpress Custom Post Type Filter not Working

I am pretty new to Wordpress and I have a problem with a filter in custom Post types.. See screenshot here of what I mean: Here is the code I am using for the filter public function ...
0
votes
3answers
103 views

How to list the Hooks and order of execution in current loading page?

I need to know the list of hooks that are called in the current page . How to identify the priority assigned to the action and filters in the action . If i want to remove the default action on ...
1
vote
0answers
150 views

Woocommerce - sort by discount in dropdown menu - woocommerce_get_catalog_ordering_args [closed]

I have searched and searched for a solution for adding a "Sort by Discount" to the dropdown on the shop page in woocommerce. I need to add a calculation such as this somewhere: $percentage= ...
0
votes
0answers
22 views

Apply `the_content' filter to theme customisation live preview

I'm using 'transport' => 'postMessage' to update the text within the footer area during theme customisation live preview. My problem is that on my website, the corresponding theme setting ...
1
vote
2answers
30 views

How would go about if I just want a temporary function?

How would go about if I just want a temporary function? (It's a converter just for converting Access to Wordpress tables). I want to execute several times so therefore I want it automated, but I don't ...
0
votes
1answer
22 views

child_of not working while searching

I'm trying to limit search to a parent page and its own child pages. I've changed searchform.php adding this code: <input type="hidden" value="<?php global $post; $ancestors2 = ...
0
votes
0answers
26 views

Filter does not modify wp_video_extensions but hard coding works?

I have a added a filter to extend the supported video extensions in WP 3.6 as follows: function dce_add_mov($args){ $args[] = 'mov'; return $args; } add_filter('wp_video_extensions', ...
0
votes
1answer
35 views

Combine two conditions in one statement syntax [closed]

I have two queries that I would like to combine because it becomes a lot of code and I think that's not necessary but I make a mistake with the syntax I want to combine } elseif (is_category( ...
0
votes
1answer
361 views

How to Add Additional Search Button?

I have added function to functions.php so authors can search only their published content. I would like to add additional "Search my posts" button to searchform.php so only logged in users would see - ...
0
votes
1answer
177 views

Display a list of users with avatar filterable with alphabets

I'm trying to create a page which should display a list of users with the role "Author" only and exclude all other default and custom roles. I also want them to be filterable by alphabets, so if I ...
1
vote
0answers
153 views

Admin search post meta

I have currently built a property database using WordPress and am purely using the back-end for the whole job. I am listing all the properties and used a plugin called "Easy Filter" to add custom ...
1
vote
1answer
2k views

Filter results with custom field values and dropdown

I need to filter posts by a custom field value. My specific example: User browse to products > category 1 > subcategory A. ALL "subcategory A" items (products custom post type) are displayed as ...
0
votes
2answers
267 views

Can I the caption shortcode to set caption to a data attribute, and with the image's alignment intact?

I want to output an image caption in this kind of format: <img class="alignleft size-medium wp-image-316" alt="Image Title" data-caption="Here lies the image caption" ...
0
votes
1answer
368 views

how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?

How add_action("manage_posts_custom_column", "custom_callback_fun01"); relate to add_filter("manage_{xxxx-xxx}_columns", "cusotm_callback_fun02" );? How do they both work together? By using these ...
1
vote
1answer
1k views

Custom search page and search by title, content and tag

Can someone review my code , I need to know better solutions or any bug. Okey ! , I made a PHP file to get search results by parameters and search by title , content and tag PHP's head look like: ...
1
vote
1answer
415 views

How to allow visitors to filter posts by multiple taxonomies

I am trying to allow users to filter a custom post type list by multiple taxonomies. For Example lets say my custom post type is clothing and it has two custom taxonomies brand and type associated ...
2
votes
2answers
2k views

How to filter get_avatar?

I want to use local avatar system for my wp website , I want to filter the get_avatar() function so it will return the avatar from my server instead of the default gavatar . I have the following code ...
5
votes
1answer
317 views

Limit Media Library to Given Folder

I have made a plugin that uses the Media Library to allow users to upload files to a specific directory - using the upload_dir filter. I would like to know if there is a way (i.e. a filter) I can use ...
0
votes
1answer
44 views

Add a filter to a different custom plugin

Someone has built a custom plugin that adds a textarea on the admin/edit page, and a div on the pub page. I no longer have access to the person who built the custom plugin. I have created a filter ...
0
votes
1answer
224 views

Custom Queries - Child Categories not showing up

What I'm Doing I have a cities category and normal categories. Right now I have them filtering by category, then when the user clicks a city it will filter by category AND city query_posts(array( ...
0
votes
1answer
2k views

Filter Posts By Tag

I'm trying to filter my posts by category, then further by city. The only way I can think of filter by city is if the admin adds the city to the listed tags and then filtering from there via switch ...
1
vote
1answer
177 views

How to take options from form fields and turn them in to links?

I have a form in WordPress with options when clicked they retrieve a filtered posts. I want to take the options from the form and place it like normal links. Can this be done? Thank You all in advance ...
5
votes
3answers
2k views

Change admin bar to default:off

While I quite like the admin bar I actually want it to be OFF by default instead of ON ( I don't want to disable it altogether because I want users to be able to turn it on if they want - but but I ...
0
votes
1answer
863 views

Custom Register Link on Backend Form

I want a similar solution like this one for my login form on the backend of my WordPress installation: Forgot Password URL Filter What I want to do instead of returning a custom forgot password url, ...
1
vote
1answer
388 views

What is the proper way to apply the login_form_bottom filter?

Here is my current code. function custom_login_footer() { return '<p>text text text</p>'; } add_filter('login_form_bottom', 'custom_login_footer'); I am trying to add text below the ...
0
votes
1answer
434 views

Trying to exclude custom posts based on date, while sorting by custom field

I have a custom post type named "performance". I have a custom post query that orders posts by a custom field value (order-date). Now I want to exclude posts that have order-dates that are in the ...
2
votes
3answers
1k views

How do I filter the excerpt metabox description in admin?

I want to change the default "Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts." help text below the Excerpt input area to ...