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

learn more… | top users | synonyms (4)

1
vote
0answers
13 views

Set Item Order with wp_nav_menu_{$menu->slug}_items

I have some code that adds a menu item to a menu using wp_nav_menu_{$menu->slug}_items. It's pretty easy to add a menu item as the first or last item of the menu, but I was wondering if there's ...
0
votes
2answers
24 views

Shortcode / plugin with custom (flexible) output

Following scenario: I'm building a theme framework which I want to reuse in various themes of mine. In this framework there is a collection of many shortcodes. For exemplary illustration of my ...
0
votes
0answers
18 views

Display recent commented post above new submitted post

I have a list of all posts that are commented on a particular day. If someone comments a post, I want it to put that one above the other posts, even if they are submitted on a more recent date... How ...
0
votes
0answers
12 views

How do I change the title link generated code to improve accessibility?

When you fill up the title input link WordPress will generate a code like this: <a href="http://google.com" title="Testing it"></a> However, this seems to be a bad practice ...
0
votes
0answers
22 views

Filter posts by multiple checkbox categories

I would like to set up a widget to filter my post by categories. Let's say, I do have two different categories, "Countries" and "length of stay" with sub categories. Here is an example of what I have: ...
0
votes
1answer
28 views

Custom built theme won't filter categories

I'm currently finishing up my first proper wordpress theme for my uni assignment. When I select a category in the sidebar the full list of posts from all categories are still shown. I've tried ...
2
votes
0answers
34 views

How to implement time filter to show random post 1 month for one category and 3 months for other categories

I started to work on one website after another developer and there is problem with his "popular widget" which is basically showing 3 random posts from category. There is some Switch statement which is ...
0
votes
1answer
20 views

Wordpress overwrites UNC

I am using wordpress multisite. When editing a post, adding a link to a file in UNC format, and clicking save, wordpress is stripping out the drive letter and colon before the data hits the database. ...
0
votes
1answer
31 views

filtering custom post types via meta data drop down

I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this ...
0
votes
0answers
13 views

restrict_manage_post to remove filters

Using restrict_manage_post, is it possible to remove default WP-List-Table filters? Example that I tried, but failed below: add_action( 'restrict_manage_post', 'remove_cpt_filters', 99); function ...
0
votes
0answers
36 views

Custom excerpt_more filter not working when <!--more--> tag is present

I'm doing this inside Thesis 2, in case that matters. I am using the_excerpt(); on my blog page to get the posts. And I'm using two custom filters: function custom_excerpt_length( $length ) { ...
0
votes
1answer
17 views

Adding an orderby filter, casting postmeta with multiple keys

I am using this filter to sort my query by a date field stored as text (legacy data) add_filter( 'posts_orderby', 'my_posts_orderby_date', 10, 2 ); function my_posts_orderby_date( $orderby, $query ) ...
0
votes
0answers
12 views

Filter by Author on Category Pages

I'm looking for a solution to filter/sort posts by author on category pages/archive pages, ideally by means of a drop-down menu. I've searched the Wordpress plugin repository but cannot find any ...
-1
votes
0answers
21 views

Hyphens are causing a blank result

I'm having issues with hyphens in my slugs from a tutorial I'm trying to go through... http://wp.tutsplus.com/tutorials/theme-development/create-a-quicksand-portfolio-with-wordpress/ and I'm having a ...
0
votes
0answers
24 views

How to filter a job search by city and state in a job board like Jobroller?

I'm working on a job board for a client using Jobroller. The client wants on the sidebar buttons representing states and when clicked on, display job listing based on that city. I read that Jobroller ...
2
votes
1answer
42 views

How to add a “publish” link to the quick actions

I'm trying to add a "Publish" link by the quick actions: but I'm not exactly sure of how implement it. Here's what I've got so far: add_filter('post_row_actions', function ( $actions ) { ...
0
votes
1answer
27 views

option_active_plugins filter not working

I added a filter for option_active_plugins to keep most plugins from loading on an admin page. Confirmed to be on the right page and to be returning a properly altered array, but it's having no effect ...
2
votes
2answers
92 views

Filtering 'the_title' with option to return subhead?

Problem: The WordPress iPhone app (and other WordPress-related smartphone apps) do not allow for much other than the Title and Body fields (i.e. no access to custom fields). Goal: My current ...
2
votes
1answer
31 views

What functions are included in apply_filter('the_content')

There is a function called apply_filter where you can use it like this: echo apply_filter('the_content', $my_content); It add formatting tags and clean up the content. Trac or docs I looked in ...
0
votes
1answer
32 views

Custom search form to display users only

I'm trying to build a custom search form for one of my pages. I need the search form to be able to search for users. Not only will it need to search for users, but by first name, last name etc.. ...
2
votes
1answer
91 views

How can I customize the wp_list_categories

I have a list of categories in woo-commerce which I'm trying to customize to be displayed to look like the following image. I created the above image using normal HTML and css however I would like ...
6
votes
1answer
200 views

How to create an API for my plugin?

I have been developing plugins for WordPress. Most plugins I have developed with two three classes and not so huge like Buddypress, WooCommerce or etc. I am planning to make two open source plugins ...
-1
votes
1answer
37 views

Search from Post on the basis of custom fields

I have shown all the Post on a page. Where i want to add Filter for sorting Like Date and other Custom Fields. So how can i Do this Please Help me.
0
votes
1answer
24 views

Removing an action, or dequeueing style - Both not working

What I am wanting to achieve is to remove an action called inside of another action. The action is calling a style, and although I have tried to deregister, and dequeue the style, it is still ...
1
vote
1answer
26 views

Make parent category not selectable when it has child categories

I'm trying to find a way of disabling the selection of the parent category within Wordpress 3.5.1 (post editor screen) only when that parent category contains child categories. My structure: ...
1
vote
2answers
32 views

Replace a word with a word in the URL string

I'm trying to replace a word on every page for example "Denver" with a word from a URL string, so I'll have like ?city=Atlanta in the URL. So I was thinking of using PHP's GET to just get the city ...
0
votes
1answer
40 views

Adding filter to the title without affecting the menu title

Hi I'm having problems with the the_title filter here's the code that I have: function zen_title_filter($title){ if(is_singular()){ if(!empty($_GET['asin'])){ if($title == ...
0
votes
1answer
14 views

Is it possible to put the add-filter()-hook into a function?

for my plugin with a lot of different features, I want to realize a mail-function to send HTML-mails. For this I have to add a filter-Hook like this: function set_content_type($content_type){ ...
-1
votes
0answers
14 views

Adding custom filters like size , color to url in wordpress

our website address is similar to this http://example.com/wp1/ on click of filters like size:32 and color:green , my url should look like http://example.com/wp1/products/tv/32. Please suggest code ...
2
votes
1answer
37 views

add_filter and remove_filter added before and after wp_query

I have just started with WordPress Development, and found following block of code online (in some tutorial) function filter_where( $where = '' ) { // posts in the last 30 days $where .= " AND ...
1
vote
2answers
82 views

Trouble understanding apply_filters()

In apply_filters() apply_filters( $tag, $value, $var ... ); I'm having trouble wrapping my head around the $value and $var. I read the codex and it sounds like the $value can be modified, $var not, ...
0
votes
1answer
71 views

How to edit php code in WordPress Post file?

I have a wordpress page. In that wordpress page, user will have access to the following Window to Publish their Post in to the webpage. If the user enters an URL in any of the three filed I have ...
0
votes
0answers
41 views

Wordpress - ABC filter/Pagination

I would like to list out the alphabet on a custom post type archive page, and by clicking on a letter in the alphabet it would link to a url that only displays posts that begin with that particular ...
0
votes
1answer
61 views

add <div> to end of post in the loop with plugin

I'm looking to add a <div> with some more html content to the bottom of specific posts in the loop. The the_post action can be used to add the <div> to the beginning of the post in the ...
1
vote
0answers
50 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
2answers
21 views

Disable widgets on specific posts

I run a horror related blog. Google is upset with me for displaying adsense in a sidebar widget for one specific post number (4603) that contains an article about an 18+ topic. How can I disable the ...
1
vote
1answer
60 views

add img class to native wordpress galleries

Trying to add an img class = "the image alt field" to the images in a native wordpress gallery so i can use jquery isotope to filter the gallery. I could use the image alt field or the description ...
1
vote
1answer
34 views

Two functions utilizing registration_errors filter

I wrote two plugins that utilize the registration_errors filter: add_filter( 'registration_errors', 'process_payment', 10, 3 ); add_filter( 'registration_errors', 'add_user_to_SF', 10, 3 ); When ...
1
vote
1answer
41 views

Using ob_get_content to get_search_form puts into infinite loop

I am trying to change the look of my searchform. It basically needs to have two text fields. I want this to be in form of a plugin, which anyone can activate. SO obviously I do not have any control ...
0
votes
1answer
24 views

How can I add a filter to a particular post format?

I have several post formats and I want to use add_filter selectively, applying the filter to some of the post formats but not all. When I do this in my functions.php file it affect all the post ...
0
votes
1answer
37 views

Empty string supplied as input when parsing content

I have this code: <?php function mb_find_my_image( $content ) { if( is_home() ) { /* if is home start */ $dom = new domDocument; $dom->loadHTML($content); ...
1
vote
1answer
17 views

how to use force_filtered_html_on_import in add_filter?

This is my situation. I have two plugins, one plugin will read a remote XML file and downloads content then it calls a function on another plugin to do the actual importing of posts to the WordPress ...
0
votes
1answer
23 views

Filter everything from content except output of a shortcode

Is it possible to filter the output of either the content or excerpt so that I only get the the shortcode output and so that if a user enters more than the shortcode the rest of the content for that ...
1
vote
1answer
64 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, ...
3
votes
1answer
109 views

Integrate post tags in Post Edit page with qTranslate

Summary In the tags widget in the Post Edit page, I need to know a way to filter through: the tags suggestions the tag terms update when saving or updating the post At least that is what I think ...
1
vote
1answer
27 views

Remove class that has been added by parent theme

My parent theme generates the following class in body: style-cupcake. I don't want that. The best way to get rid of this is by adding my own functions in a functions.php file in my child theme, right? ...
2
votes
1answer
30 views

Trying to wrap <span> around first word of multiple word strings with a widget_title() filter, only works on two word strings and not more than two

I am trying to wrap a around the first word of multiple word widget titles. I have used the answer from here: ...
0
votes
0answers
26 views

attachment_fields_to_edit stopped working in plugin following 3.5 update

Following an upgrade to WP3.5 Elvin, a plugin that duplicates images (by duplicating metadata, not by actually copying the image) stopped working. The plugin, BDN Duplicate Images, is just one file ...
0
votes
2answers
48 views

How to apply filter inside a single wp_query?

I've got a special query on my homepage that returns posts from a custom taxonomy. I'm trying to apply this filter for it. add_filter( 'post_limits', 'my_post_limits' ); function my_post_limits( ...
0
votes
0answers
58 views

custom styling for woocommerce categories

I am using hooks and customizing the template files to use woocommerce. On my products page I want a list of categories along the top like this. I would even settle for a neat list of them where my ...

1 2 3 4 5 15