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

learn more… | top users | synonyms (5)

5
votes
1answer
50 views

How to auto-translate custom user roles?

I developed a small plugin that adds (or to be more precise: first deletes then adds again) some custom user roles. Each of these roles is set up in a way like this: function ...
5
votes
1answer
1k views

How to add sub-menu to a menu generated by wp_nav_menu by using plugin

I have a menu generated by wp_nav_menu which look like <ul class="nav-menu" id="menu-top-nav"> <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-43" ...
2
votes
1answer
202 views

Refine/Filter WP_Query Posts with jQuery or Ajax

I know this has been asked many many times, but I literally searched for an answer for more than 5 hours without finding anything that drives me in the right direction. What I'm trying to achieve is ...
2
votes
1answer
191 views

WooCommerce product search titles only

I had asked this earlier and solved it using the Relevanssi plugin, however that plugin is now breaking things so I can't use it anymore. How is something so freaking simple made so impossible by ...
0
votes
0answers
38 views

making a glossary with wordpress

I know that there are glossary plugins in the wordpress repository. This plugins normally searches glossary terms in post content and adds a link to it. But i have not found one, that search and ...
0
votes
0answers
17 views

How can I update the role of a newly added user when displaying the registration form with a shortcode?

Basically I have a shortcode that includes a registration form(among other things). The custom form itself is also included on wp-login.php and user-new.php if the default role is set to ...
0
votes
0answers
50 views

URL parameters causing 404 on home page, but nowhere else

I am writing a plugin that utilizes URL parameters. For some reason, adding one of these parameters to the home page of my website causes a 404 (http://bleaney.ca/?source=asdf). Adding the parameter ...
0
votes
0answers
40 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...
0
votes
0answers
29 views

Adding a Filter to Sidbar Login Plugin to Change Login Button Lable

I'm a newbie and I have not been able to find an answer to my question. I have installed the Sidebar Login plugin and I'm trying to change the form labels, specifically,the login button label. I ...
0
votes
0answers
39 views

How do I turn off local pickup for a specific shipping category?

Can anybody provide me with some code that would help? I need to be able to offer flat rate shipping AND local pickup for all product categories apart from 2, which I have assigned to a separate ...
0
votes
0answers
45 views

Cforms II conditional processing

I have a form with 2 email fields. When the form is submitted I need to check whether the emails entered in the form already exist in the database, if any one of the emails entered on the form exist I ...
0
votes
0answers
126 views

Rename uploads filenames to POST-ID on upload

I would like to change the way Wordpress rename uploaded files on upload. As I upload an image whose filename is "see-sunset.jpg", Wordpress will set up scaled versions and rename filenames to ...
0
votes
0answers
14 views

apply_filter('{$field_no_prefix}_save_pre', $value) function clipping HTML

In wp-include/post.php there is a function named sanitize_post_field($field, $value, $post_id, $context). In this, the apply_filter('{$field_no_prefix}_save_pre', $value) function clips the form type ...
0
votes
0answers
46 views

Set post title and slug from meta fields not working

I have a custom post type where I have the post title disabled. I want to set the post title and slug from some custom fields. I was using this and it worked great, but since I've upgraded by site to ...
0
votes
0answers
39 views

In a page I need to display posts “standard” and post “videos” with post formats

I have created a filter to display "standard" posts in a page by selecting category and it works well but it deletes "video" posts. I need to create another filter to display the "video" posts from ...
0
votes
0answers
32 views

Filter posts with missing attributes

I'm doing house-keeping on my posts, and a lot of IMG tags in my old posts do not have class="alignnone size-full wp-image-xxx" or width="xxx" height="xxx". The attributes are needed for responsive ...
0
votes
0answers
45 views

How to update permalink on the fly?

So, Wordpress automatically generates the slug/permalink on the fly based on the post title after you click away from editing the title. Is there an action/filter hook for me to change those on the ...
0
votes
0answers
49 views

Continue Reading link with the_content filter

I am trying to get the read more link with the the_content filter. $post = get_post( $v['post_id'] ); $content = $post->post_content; $content = apply_filters('the_content', get_the_content( ...
0
votes
0answers
126 views

Trying to apply apply_filters to custom post type content - not working

this is kind of a strange request. I have a plugin that adds a custom post type - then the plugin has some settings where the user can select from any of the posts they created (in that custom post ...
0
votes
0answers
66 views

How to display list of categories when using multi category filter

I'm using a multiple category filter by linking to URLs such as: domain.com/category/reviews+books domain.com/category/reviews+art etc This works fine as a filter but I can't find any built in ...
0
votes
0answers
94 views

Customize register form page with add_action or apply_filter

I am studying "action and filter" and confused. I have a theme and I need to add "phone number1, phone number2" on register form page. I have been trying to file apply filter or add action on the ...
0
votes
0answers
48 views

Show post when both categories are present but not one of them

I'm having issue filtering posts by category. There is the A category for posts (which is the default and also applies when no category has been set explicitly) and B category with subcategories for ...
0
votes
0answers
47 views

Query Database and Return the result in translated pages

I am having a problem for a while now and I canĀ“t seem to solve it on my own. I have made a website, this website is multilingual and it was made in wordpress. In my "photo album" page when I sort ...
0
votes
0answers
33 views

get_the_excerpt on mobile still displays continue reading

I'm writing a plugin where I'm using the excerpt field as just another field. In order to get rid of the 'Continue Reading' Link, I'm removing all possible theme filters: add_action( ...
0
votes
0answers
108 views

How to reset/remove added filters 'posts_join' and 'posts_orderby' after the loop is completed?

I am sorting results appear on the category archive page using these filters: posts_join and posts_orderby. There is a widget, which displays recent posts. I am using default recent posts widget of ...
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
0answers
53 views

Plugin only apply pages/posts after certain date?

Is there a way to make a plugin that filters out words from posts/pages only work for posts/pages that were created after a certain date? Is there a general code one could apply to it or would it ...
0
votes
0answers
45 views

Custom post type archive doesn't react to is_archive after use of filter

I have made a custom post type with 3 taxonomies, and a filter that lets you choose a category from every taxonomy on the archive page. When I use the filter and get results, it works like you'd ...
0
votes
0answers
127 views

Sortable/Filtered Taxonomies and Custom Post Functions on frontend

I've made my taxonomies and custom post functions filtered and sortable on the wordpress dashboard but I have no idea how to get them to sort and filter on the frontend. Here is a screenshot of the ...
0
votes
0answers
103 views

Date filter for post query not filtering results when variable outside the function

I am working on the following code which should display the most popular posts that are X days old ($days = 7;) (1) The main problem here is with my filter_where function. I want to pass the number ...
0
votes
0answers
154 views

Sharing Buttons - url doesn't show up in dialog box

I'm currently applying a theme option I made that enables/disables social media share buttons at the end of post's content. Currently I'm struggling with getting the social media button's dialog ...
0
votes
0answers
168 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 ...
0
votes
0answers
548 views

Add jQuery Validation in Gravity Forms Form

So I have some jQuery functions that adjust my column layout on window load and window resize. They are inside a file called bp-columns.js that looks like this: jQuery(window).load(function () { ...
0
votes
0answers
58 views

How to create filter for site

Good afternoon. Learning WordPress, I would like tips on how to make the filter on my website (not in the admin panel). For custom fields using magic fields 2 to display all the records I've just ...
0
votes
0answers
85 views

Include a page template along with add_theme_support()

I'm not even sure this is possible but before I start thinking up crazy solutions, I'll see if there is a WordPress way to do it. Here's the deal. I have a timeline jQuery plugin all set up on ...
0
votes
0answers
40 views

Redirecting instead of returning value in add_filter function

I have a filter for post_data before use wp_insert_post: function save_custom_post(){ $post_data = apply_filters('cpt_post_data', array(....)); do_action('before_save_cpt'); wp_insert_post( ...
0
votes
0answers
158 views

Using the URL filter on wordpress

I have a form which allows users to filter posts by selecting multiple categories. It works well and I wanted to enhance it so that users can get what they are looking for. What I understand is that ...
0
votes
0answers
81 views

attachment_fields_to_edit 3.5 : How to change the 'link to' options?

In <3.5, I was using this filter: if (substr($post->post_mime_type,0,5) == 'image'){//array shift is being used to get the first element, [0] $html = "<input type='text' class='text ...
0
votes
0answers
167 views

Filter “Awesome Filterable Portfolio” Plug-In to Display a Specific Category by Default

I am using the "Awesome Filterable Portfolio" Plug-In. You are supposed to put the short code on whatever page you want the portfolio to appear: [af-portfolio] The portfolio does appear with the ...
0
votes
0answers
41 views

Adding Search Filter on Informational Website

Background: Say I am creating a website for a popular mobile brand. On this site I will have "informative" articles. Every mobile will also have a short overview, followed by specs and images of the ...
0
votes
0answers
154 views

Disable Filter and Allow Embed/iFrame on Blogger Import

I'm trying to import blogger posts into a wordpress site but all embedded audio/video content is getting filtered out. I've commented out the following in kses.php: // Post filtering ...
0
votes
0answers
127 views

Can't update an option when the publish_post action is fired.

I'm using Tom McFarlin's Plugin Boilerplate, and I'm facing this huge problem where I can't update an option when the publish_post action is fired. I have a function that hooks into the publish post ...
0
votes
0answers
23 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
285 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
0answers
201 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
0answers
84 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 ...
0
votes
0answers
126 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 ...
0
votes
0answers
153 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
0answers
228 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
votes
0answers
20 views

How can I manipulate the HTML of the_content in a specific way?

I know the basics of how to add a filter to modify the_content, but I want to modify the HTML in detail. Specifically, I want to find any <blockquote> elements and add some HTML within them. ...