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

learn more… | top users | synonyms (5)

2
votes
0answers
121 views

Completely strip any hidden formatting when pasting into TinyMCE

In WordPress v4+, I want to remove all hidden formatting when users paste content into TinyMCE visual editor. The Paste as Text button works when users insert text from Microsoft Word but doesn't do ...
2
votes
0answers
215 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
26 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
33 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
32 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
50 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
79 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
831 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
160 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 ...
1
vote
0answers
113 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
34 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
42 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
137 views

GET form action. Redirect to self

I'm writing filter for posts by category on author page. I send category name in $_GET array in this form: <form action="" accept-charset="UTF-8" method="get" id="form1"> <select ...
1
vote
0answers
41 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
63 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
101 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
102 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
61 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
97 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
143 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
257 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
275 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 ...
1
vote
0answers
56 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
312 views

Walker_Nav_Menu doesn't work in wp_page_menu_args filter

I need to hide certain nav items from the menu (based on the password protection functionality) and I'm having trouble getting my custom Walker to work. In fact, I can't even get the standard ...
1
vote
0answers
48 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
235 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
210 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
462 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
182 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
266 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
374 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
295 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
12 views

The title of an attachment is not working

I use this function to assign the title of every page: function my_title() { switch ( true ) { // [...] case (is_attachment()): wp_title(''); // This doesn't work ...
0
votes
0answers
9 views

How do can I pass data retrieved from a filter to template files?

I wrote this class to display only the current top level menu item's children: class deseng_navSplit { var $sorted_menu_items; var $args; function __construct($x, $y) { ...
0
votes
0answers
9 views

Is this the proper way of switching the “Edit My Profile” link with my BuddyPress “Extended Profile” link?

I am using the Multisite feature enabled. I have a main site and a community site. On the main site the 'Edit My Profile' links is pointing to this link: ...
0
votes
0answers
15 views

Converting a checkbox filter for custom fields to a dropdown

I've been scratching my head trying to figure this out for awhile now and was wondering if someone could provide some help. My PHP knowledge isn't the best so I'm working with what I have and it ...
0
votes
0answers
11 views

Filtered $locale isn't applied on templates language lines

I change the global $locale by the following code in my functions.php function change_locale_on_admin ($locale) { if(is_admin()) { $locale='en_US'; } return $locale; } ...
0
votes
0answers
14 views

Conditionally Use image_resize_dimensions()

I used add_image_size() and image_resize_dimensions() to upscale and crop images in WordPress. It is working as expected except on the Edit Media page. Generally on this page you would see your full ...
0
votes
0answers
11 views

custom post types not appearing in Search multiple post types

I have a Search page where users can select to search for multiple post types: posts, pages, docs, newsletter. What is driving me nuts is that: a) Users can select posts/pages OR docs OR ...
0
votes
0answers
13 views

Add filter to Orderby Parameter using Array

Using WP-Query, I'm setting the Orderby parameter using an array: $events_args = array( 'post_status' => 'publish', 'post_type' => 'events', 'meta_key' => 'start_time', ...
0
votes
0answers
15 views

Rewrite Rules with custom taxonomies not changing

I've been messing around with wordpress custom taxonomies recently in conjunction with advanced search queries and I'm trying to make search urls look prettier by using rewrite rules, these taxonomies ...
0
votes
0answers
10 views

posts_clauses : Filtering Posts by multiple meta posts issue

Im trying to write function to filter posts by country and language, but as I see here posts are not filtered and I cant detect where is the problem. This is my code inserted in beginning of my ...
0
votes
0answers
10 views

Setup lazyload on post images using get_image_tag

According to jQuery.lazyload any images I'd like to "lazyload" need to have the src attribute replaced with data-original. I'm assuming I can do this using WP's get_image_tag filter, but I'm stuck on ...
0
votes
0answers
47 views

add current-menu-item to multiple custom post types

I have two custom post types, and I have trouble adding the current-menu-item to both. In my functions.php I have following code: function additional_active_item_classes($classes = array(), ...
0
votes
0answers
23 views

do_action filter function from add_action array

I am looking at the following setup: -- Combing multiple functions into single action -- add_action( 'single_post_meta_start', array( $this, 'the_title' ), 10 ); add_action( ...
0
votes
0answers
8 views

Widget is breaking on filter function

I have created a widget which displays posts based on Display Posts shortcode. All works fine till I have added filter to public function widget() to output titles only (and need to be executed only ...
0
votes
0answers
42 views

Removing a line from a WP core function (comment_template.php) - filter or other technique?

a The effect I want to achieve - at least at this point - is simply to have the comment reply link continue to appear below comments even after "max_depth" for threaded comments has been reached. ...
0
votes
0answers
14 views

Remove image width and height on replace

I've already figured out how to remove the height and width attribute from images on insert: add_filter( 'get_image_tag', 'remove_width_and_height_attribute', 10 ); add_filter( 'post_thumbnail_html', ...
0
votes
0answers
12 views

WordPress Custom Field Filter Broken For Comparison

I'm running a custom field - event date and time - that uses a UNIX timestamp to denote when an event takes place. I'd like the user to be able to filter events in the past or the future. The code ...
0
votes
0answers
24 views

How can I use a filter/hook to modify the URL passed in the content of an [embed] shortcode?

If I pass the [embed] shortcode an absolute URL that only includes the path (i.e. it starts with a slash and is hosted on the same server as the page itself), if it's a movie file, it doesn't ...