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

learn more… | top users | synonyms (5)

2
votes
0answers
487 views

Changing image URLs in media library

On a default wordpress install, the media library is located at: /wp-admin/upload.php. I am trying to update the image URL to point to my CDN, not my local server. This filter ...
2
votes
0answers
283 views

How to display term description in empty terms archive?

I list all terms from a taxonomy, even the empty ones, but I found out that at least in 2010/2011 themes I got a 404-like message, the default seems to only display the term description when at least ...
1
vote
0answers
18 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
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: ...
1
vote
0answers
28 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 ...
1
vote
0answers
44 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
49 views

WooCommerce email shipping text value

I'm attempting to use the 'woocommerce_order_shipping_to_display' filter to show 'Free' in the WooCommerce email table when no shipping charges will be incurred. In the image, I'm trying to get 'Flat ...
1
vote
0answers
58 views

Comment search plugin

I want to develop a plugin which places a search input field above the first comment on the post pages, filters the comments below that post, and only shows the comments which include the string that ...
1
vote
0answers
92 views

Filtering posts list table

My post_type is 'part'. I created a custom field 'Images' this way (simply added new columns to the array): add_filter( 'manage_edit-part_columns', 'my_columns_filter' ); function my_columns_filter( ...
1
vote
0answers
63 views

Customize WordPress Media Manager - Media Window

Im trying to customize the wordpress media manager "add media" window to get it as simple as possible to use. So i want to disable/ hide the following fields/ functions because i dont need some or ...
1
vote
0answers
156 views

add_filter hook redirect view cart button in woocommerce

In my current multilanguage wp project I'm trying to redirect the user from the checkout (which is in the current language choosen by the user) via "view cart"-button to a translated cart page. ...
1
vote
0answers
163 views

Slow WP_Query with 'OR' on meta_query

Essentially, I'm trying to query using a filter for the args being fed into WP_Query() like so: public function filter_wp_query( $args, $template_slug ) { $args['post_type'] = ...
1
vote
0answers
101 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', ...
1
vote
0answers
42 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 ...
1
vote
0answers
301 views

Run oembed separately outside the_content()

I have this structure for my content.php : <div class="featured"> <!--featured image here--> </div> <h1 class="entry-title">Post Title</h1> <div ...
1
vote
0answers
58 views

<p> tag removed not using a filter

Very strange WordPress behavior: <p> tags are removed when placed inside <pre> tags, but not always. for example, this works fine: <pre><p>This is a ...
1
vote
0answers
101 views

Change tinyMCE editor to allow marked content when pasting from Word

I'm a big supporter of how WordPress handles pasted text from Word, however for my client I need to change this. My client is marking text within Word to use as a reminder (background color). Does ...
1
vote
0answers
197 views

Remove posts inside pre_get_posts using a custom query

I need to remove posts from admin listing, if their last child post author is different than the parent post author. I was hoping to use pre_get_posts, but can't figure out how to do this. Here's my ...
1
vote
0answers
82 views

Create Search Form to Filter Through Terms

I have pages that displays a list / grid view of all my taxonomy terms. Over 200 terms. The page is paginated since there are so many terms, however, I would also like to include a "search" box at the ...
1
vote
0answers
147 views

Remove / Hide Attachment Display Settings in Add Media popup / dialog

I would like to filter out the 'Alignment' and 'Link to' options for Inserting Images. Ideally with php in the functions.php file. Thanks!
1
vote
0answers
1k views

How to set a custom path, for ajax image upload folder in admin?

I am coding my first Wordpress plugin that handles some data for a custom (shop-like) post type. It also has an image uploader within a metabox, where you simply drag in your images and it ...
1
vote
0answers
182 views

How to customize the “Insert/edit link” popup box?

is there a way to customize the "Insert/edit link" popup box in the editor so that it does something like this: Have a checkbox that says "Insert affiliate tag at the end of link" If the checkbox is ...
1
vote
0answers
37 views

Categories filtering in new post

I have a website with post types that have subtitles for movies. That files are on a specific custom post type using http://www.wpdownloadmanager.com/ pro. Because all custom type posts are movies ...
1
vote
0answers
60 views

Formatting get_post content doesn't allow JS content to function properly

I am currently pulling in the latest post on a category page based on which category you click on. When you click on the category "Code Examples" you see this: I am using the Crayon syntax ...
1
vote
0answers
46 views

Filter categories used with Custom Structure Permalink

I'm using a "Custom Structure" permalink setting: http://mysite.com/%category%/%postname%/ However, when the post belongs to uncategorized, or to more than one category, this produces unwanted URL ...
1
vote
0answers
68 views

Add custom text in the media library image meta area

I want to add some custom text in this area in the media library: Is there a filter I could hook into or how can I add content there? If not, how do we do this using Javascript? I want the text to ...
1
vote
0answers
206 views

Wordpress custom admin notice still displays after wp_insert_post_data validation

I am trying to validate post data before saving, specifically checking to see if an image exists within the first 750 characters of the post content. The code below works and display the admin notice ...
1
vote
0answers
154 views

Filter pre_get_posts does not modify Mine/All/Pending

Maybe I need to use a different filter, but I am using the pre_get_posts filter to filter out posts on a custom post list view. It works for the main table, but the quicklinks to (All) (Published) ...
1
vote
0answers
69 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
1
vote
0answers
110 views

Make WP not format code, not insert line breaks in between tags

Gahhhh! Are you kidding? Ok, I guess wp wants my source code all nice and formatted... <a href="/asdf">i'm a link</a><ul><li>list item</li></ul> becomes ...
1
vote
0answers
225 views

Conditional Image Sizes for Use via Theme Customizer Upload Only

I'm looking for a way to add image sizes that are only generated by uploads happening in the Theme Customizer, any suggestions or direction on how this could be done? I've already worked with the ...
1
vote
0answers
382 views

Pass parameter to the upload_dir filter

I'm trying to figure out a better way to pass a parameter to the function I am using with the upload_dir filter. Currently I have only gotten it to work by using sessions and/or cookie that I erase ...
1
vote
0answers
62 views

Alternative to the filter comment_reply_link

I'm making a plugin and need to add a link to every comment on the front-end. I've used the filter comment_reply_link but that filter doesn't work when we're on the lowest level of threaded comments ...
1
vote
0answers
57 views

Sorting a specific taxonomy by archive date using URL

OK, so I'm looking for a way to sort a specific taxonomy by archive date using the site URL. Say the custom taxonomy ("sort") value is "fruit" then then you would currently get all the posts marked ...
1
vote
0answers
281 views

Filtering get_permalink in Jetpack / ShareDaddy

I recently changed my permalink structure from /YYYY/MM/%post_name%/ to /%post_name%/, and lost my tweet counts and likes (provided by Jetpack) in the process. To fix this, I want Jetpack to use the ...
1
vote
0answers
270 views

wp_mail works with add_action('save_post', …) but not an ajax action

I have two actions. One is after saving a post, so add_action('save_post', 'on_any_post'); I have a second action triggered via AJAX, so add_action( 'wp_ajax_nopriv_saveTaskPriority', ...
1
vote
0answers
565 views

Refine/Filter the Search Results by Category

I am currently creating the process of a function which allows one to refine results, Namely by category. Similar to themeforest.net refine the search results. When i gave as search term "Hello" and ...
1
vote
0answers
217 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
0answers
346 views

Querying posts with meta value that begins with a certain pattern

I am trying to create a search filter using meta_query. The only problem I'm having now is that I can't compare with wildcards. I think that's how you word it? $keyword = 'sos'; $tlds = ...
1
vote
0answers
563 views

define orderby URL with meta_key=post_views_count

I want to make an url with meta_key=post_views_count. E.g: http://www.mysampleweb.com/?meta_key=post_views_count&orderby=meta_value&order=DESC So the posts should be ordered by Views. ...
1
vote
0answers
325 views

add_filter with retrieve_password_message() not working in plugin, but works in functions.php

I'm trying to use retrieve_password_message to change the lost password email. The problem is that when I use it in a theme's functions.php, it works great, but when I put it into my (activated, ...
0
votes
0answers
17 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 ...
0
votes
0answers
9 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 ...
0
votes
0answers
21 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.). ...
0
votes
0answers
8 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
17 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
8 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 ...
0
votes
0answers
12 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 ...
0
votes
0answers
16 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 ...
0
votes
0answers
26 views

Filters, priority when run after plugins_loaded

in my main plugin I filter the_content to add rich snippet, something like this: add_filter('the_content', 'add_schema'); function add_schema($content) { $schema=NULL; //To avoid undefined ...