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

learn more… | top users | synonyms (5)

1
vote
0answers
12 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 ...
0
votes
0answers
16 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. ...
1
vote
1answer
117 views

Custom Taxonomy breaking pages permalinks

I'm stuck for some days with this problem and I don't know what else to do. With %somethingHere% on slug rewrite, pages permalinks are broken (CPT AND CT OK). Without, I don't have my desired Post ...
1
vote
1answer
10 views

Is there any filter to trigger as soon as media is uploaded to post or page?

I am new to WordPress. I want to change attributes of image when uploaded to page or posts. Is there any filter for it? Thanks in advance.
-2
votes
0answers
11 views

GravityForms gform_tabindex_X filter not working [closed]

I am attempting to use this code snippet in my theme's functions.php file to assign a new starting tab index to form 5 as mentioned in the documentation but it doesn't get overridden: ...
-2
votes
0answers
5 views

getting value from gravity form entries [closed]

i have a Gravity Form and want to get the values from various fields, do a calculation and put that value into a total field ( the form goes to paypal). This would be relatively easy just using the ...
10
votes
1answer
7k views

How to add defer=“defer” tag in plugin javascripts?

I couldn't add defer tag in plugin javascripts. Google developer pagespeed test suggests me to add defer tag in contact form 7 javascripts. This is how contact form 7 includes javascript in header. ...
1
vote
1answer
134 views

How can I see a list of my Custom Post Types of the last term I was in?

Sorry about the title I do not know how to put the question in the form of a title very well but my question if very descriptive. Iv been meaning to asking this question for a while now and would ...
1
vote
1answer
374 views

Using add_filter() in Widgets

Just have a query reference the add_filter() function. Can you use this function inside a WordPress widget class. Example I have a widget with dynamic created code that I want to pass to another ...
0
votes
1answer
23 views

Custom nav walker: How to acces the $args parameter?

I am creating a custom nav walker. I noticed that the nav walker class from the WordPress core is written rather rough – much of the stuff going on could be spread out through various methods, so I ...
0
votes
1answer
282 views

Search a title word through query_posts (not the exact match)

We're working on a database with personal data from different sportsmen such as name, height, weight, etc. We've managed to build a detailed filter through query_posts. Every filter field is working ...
0
votes
1answer
303 views

Filter to hook into menu <li> items and add a custom attribute

I'm using Foundation as a base and starter theme. I'm trying to build and I can't seem to figure out how to hook into the menu that WordPress outputs and add a custom attribute to that menu's ...
0
votes
0answers
8 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
1answer
558 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: ...
2
votes
1answer
558 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 ...
0
votes
2answers
2k views

How to append new form elements in “Add New” form of Users in Wordpress admin panel?

I'm developing a WordPress plugin and I want to append some extra form fields in add new form of Users section inside admin panel without editing core files. Can somebody help me in achieving this.
-1
votes
0answers
31 views

Move plugin content into the_content

I have a plugin to display author content in a post. The plugin is working as intended, but I'd like to move the display of the plugin above the pagination. Since the pagination tool is contained ...
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
1answer
66 views

How add a group by to the query used by the media library?

What would be the proper way to add a group by to the media library query? What I have tired so far is not working: add_filter('posts_groupby ', 'limitMediaLibraryItems', 10, 2 ); function ...
0
votes
0answers
16 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 ...
1
vote
3answers
5k views

How can I edit post data before it is saved?

I have a plugin and I would like to be able to run the post content through some filters before it is saved to the database. From looking at the plugin api, I see that two hooks that look like they ...
1
vote
1answer
83 views

post_row_actions filter is not working while update post using quick edit

I have created two links using post_row_actions, it was displaying fine when page loads. But the links will get disappear after update post using quick-edit. Is it a bug from WordPress or did I miss ...
0
votes
0answers
11 views

Filter custom post type by tags

I really doubt if this is possible but I would like to filter a custom post type with Isotope based on the tag of the post and not the taxonomy. I'm currently using $terms = get_terms("taxonomy"); ...
-3
votes
1answer
32 views

Which action/filter can i use for a Member Plugin [closed]

I'm a beginner in Wordpress Plugin development. I want to write a Plugin for a Member Part on my Page. I know, that Plugins for this Problem available, but i want to create an own Plugin ;) I want to ...
0
votes
0answers
14 views

Woocommerce Product Category Filter by Parent

I don't think the title is detailed enough, but the main issue here is making a filter with three drop-down menus, each one getting populated after selecting the previous (apart the first one). An ...
0
votes
0answers
26 views

Filter wp_get_attachment_image

I'm working on a new WordPress plugin, that will have to change the media library directly. For that I have to overwrite or filter the wp_get_attachment_image function, that class-wp-media-list-table ...
0
votes
0answers
14 views

Create Featured images on the fly

The title is too short to descirbe what i want to accomplish so let me start. I have a custom type ('chesspuzzles') and I want to create the featured images on the fly (and use them in widgets too, ...
6
votes
1answer
67 views

Modify links when inserted by WYSIWYG editor

Is there any possibility to hook into the editor of WordPress so that if a link to an internal content is inserted via the WYSIWYG editor the post id of that linked post is added as a data attribute ...
0
votes
0answers
14 views

How To Filter Tags by Category

I have a GIF blog with around 15.000 posts and around 8000 tags. These posts are into different categories (2 categories only). The two categories i have are "Reaction GIF" and "Normal GIF". Is there ...
0
votes
1answer
843 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
2answers
8 views

Image filter works on attachement pages but not posts. I can't get the image ID

I'm using a plugin called Exifography. They provide the capability to use filters to adjust for your purposes. In the example provided I'm simply trying to get the height & width of the image and ...
0
votes
0answers
8 views

Filter for wp_embed_handler_youtube not working

In Wordpress 4.0, if I create a new post and paste a YouTube link directly into the post editor, Wordpress will automatically convert it to a YouTube embed tag. I'm trying to edit the default output ...
0
votes
0answers
12 views

Write Custom Access Control Code For WordPress Download Manager

The WordPress Download Manager plugin by default allow us to select which rule can access the file. But I have a special case, I want if the user have a meta date equal to specific value then the ...
0
votes
0answers
9 views

Run function after theme is installed for the first time

I want to run a function to add default widgets for my theme when it's installed for the first time. I tried add_action( 'after_switch_theme', 'add_theme_widgets' ); but it resets the widgets back to ...
0
votes
0answers
15 views

Custom options for sidebar (widgets container)

How can I create custom options for the sidebar? Like toggling the sidebar and setting its width, right from the widget area? I can do this for widgets but not the sidebar. Here's an illustration of ...
2
votes
1answer
95 views

Wordpress Media mime type filter problem 4.0

I have added new mime types with the 'post_mime_types' filter eg. PDF, doc, mp3 etc... Filtering by custom mime type on the upload.php page in media grid view works as expected but in list view it ...
0
votes
0answers
22 views

Search for posts with specific tag inside custom page template

I'm developing a Wordpress blog where there are two custom pages - i.e., different from index.php. In there, there are two albums of photos, with the photos listed on a div above. I've put an input ...
1
vote
1answer
32 views

Namespaced action and filter tags

I'm upgrading several of my plugins to use PHP namespaces, so that functions, classes, constants etc are all namespaced correctly. <?php namespace my\plugin; function init() { ... } // ...
1
vote
1answer
2k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
2
votes
3answers
2k views

Shortcode from a widget is wrapped in unwanted <p> element

I'm using Black Studio TinyMCE Widget as a rich text editor widget. In a sidebar I inserted the TinyMCE widget with a [testimonial] shortcode and some content after it. For example: [testimonial] ...
0
votes
1answer
55 views

How to add a custom filter in functions.php

I have been through the Wordpress codex but I can't figure out how to write a filter. I would like to use a filter called: 'wpseo_sitemap_' . $filter . '_change_freq'. It expects you to return one of ...
2
votes
2answers
1k views

Modify the post/entry wrapper markup in genesis childtheme [closed]

I feel like this should be an easily found answer but so far I havent found anything. So the genesis loop automatically wraps the posts in a div like so: <div class="post-4006 post type-post ...
0
votes
0answers
29 views

Filter Posts using Letters in archive page

I have created an archive for a custom post type called archive-artists.php. I want to achieve the following: Implement an A-Z letter control which filters the posts based on the letter selected by a ...
1
vote
1answer
650 views

Only let plugin add actions to wp_head & wp_footer on single posts

I'm using a a plugin (Comments Evolved) on a recently built site. The issue I'm having is that this plugin globally enqueueing and adding actions to the head and footer of all pages. I'd like to ...
0
votes
1answer
63 views

Problem with login form

I'm having a problem with the login form for a site I've inherited, wherein only certain users are sent to the correct page after logging in. On this site, users with accounts are allowed into a ...
2
votes
0answers
97 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 ...
0
votes
0answers
26 views

Meta query with regular expression

I am using regular expression to refine the post it works fine but i want change it such that it can work with meta query instead of post title here is my code function wpse18704_posts_group( $where, ...
0
votes
0answers
14 views

the_content filter together with require_once returns 1 instead of the content of the included file

It's a weird problem that looks like to have something todo with the WP SEO plugin from Yoast. If I disable it ( and no other plugins are running ), the output is what I expect it to be. It shows the ...
0
votes
2answers
380 views

Create subpage - filter parent pages list

I have a website here with a lot of content and with the content where is necessary to create pages in hierarchy. But it is uncomfortable to go through the dropdown in the administration with a lot of ...
0
votes
0answers
20 views

Filtering by a certain array of categories

This is my first post. If it's misplaced or not correct in any other way, let me know I'm using a portfolio theme for a furniture company. They wanted to sort by product category (Chairs, Tables, ...