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

learn more… | top users | synonyms (5)

2
votes
0answers
362 views

How to hook a filter to catch get_post_meta when alternate a custom field output?

How to hook a filter to catch get_post_meta when alternate a custom field output? I have fill a custom field(meta data) in a post, just like this: <!--:de-->Nominale ...
2
votes
0answers
187 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
33 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
91 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
59 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
70 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
33 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
31 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
34 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
54 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
68 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
83 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
55 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
86 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
113 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
205 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
53 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
257 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
45 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
200 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
190 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
431 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
157 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
236 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
276 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
281 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
3 views

Is there any plugin to search by multiple fields input from excel table?

I am just like a layman in web developing; I made a simple website on mantra theme. I have a long data in excel table where column 1 is country name, 2 is company name and 3 is product name, while in ...
0
votes
0answers
33 views

How to modify specific parts of a post content in WordPress

I'm trying to insert some custom code in each post in Wordpress, provided that it complies wit certain conditions. My problem is that the content needs to be added in an specific location that is not ...
0
votes
0answers
18 views

Stop a specific plugin from executing based on product id in cart

I am trying to stop a specific plugin from executing based on product id in cart. However i can't seem to get it running. There are a few places where i want the plugin to stop inserting its function. ...
0
votes
0answers
22 views

Filter WP_Query output before it is accessed (pre_get_posts)?

I have read Using pre_get_posts with WP_Query and I'm not sure where to go with it. I have a recent posts plugin which adds variables to WP_Query - one of which can be 'offset' posts. The problem is ...
0
votes
0answers
15 views

Update taxonomy term count after the post is published

I am trying to update the taxonomy term count after the post is published with the help of following function but its NOT WORKING, any help please... function update_count_on_publish( $post_id ) { ...
0
votes
0answers
11 views

Creating a filter to modify links ending in .pdf

I'm trying to create a filter that checks for links that are to PDFs, and append the href attribute with something like /form?file=[path to pdf]. For example, starting with: <a ...
0
votes
0answers
21 views

global wp_query returning wrong post vars

I am currently filtering the_posts to recreate wordPress' "sticky post" function for custom post types. I also have to make sure that the sticky post is attached to a certain taxonomy term that ...
0
votes
0answers
23 views

List all posts types in admin edit.php

I am trying to show a list of all posts types in the admin. For now i can only show a list of particular post type, for example: wp-admin/edit.php?post_type=video , but how can i show a list of all ...
0
votes
0answers
15 views

Autogenerated Title for Custom post type loses title when trashed/deleted

I am generating title for a custom post type using the following code. It takes the $fname, $mname, and $lname values and generates a title based on the post. This works fine for custom post creation ...
0
votes
0answers
85 views

AJAX filter posts on click based on category

This is my first foray into AJAX, I've been splicing bits of code from various tutorials which probably hasn't helped. I have a list of categories on my homepage (index.php) and a list of the most ...
0
votes
0answers
30 views

remove_filter right way

What is the right way to remove filter in condition? method 1 public function update_loop($query) { global $wp; if(!$query->is_main_query() || $query->is_admin) return; ...
0
votes
0answers
21 views

Post where filter not working with Ajax

I am trying to add filter "add_filter('posts_where', 'location_multicity_where_changes_ajaxin'); " with ajax but it is not working. After i call this in functions.php via add action it ...
0
votes
0answers
39 views

Add menu/submenu items programmatically

Newbie question here. I'm hoping to modify a menu programmatically and am having trouble figuring out the right way to do it. My site uses a membership plugin. Users pay to become members, and ...
0
votes
0answers
27 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
0answers
10 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
0answers
9 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 ...
0
votes
0answers
8 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
0answers
20 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
0answers
105 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
0answers
14 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
147 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
0answers
53 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
0answers
30 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
0answers
26 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 ...