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

learn more… | top users | synonyms (5)

-2
votes
0answers
3 views

getting value from gravity form entries [on hold]

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 ...
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
0answers
7 views

Filtering soliloquy caption [on hold]

Good afternoon, I'm starting to learn about filters and wondering what the best practice would be to filter the code below to add a CSS class to the soliloquy-caption div. if ( ! empty( ...
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
111 views
+100

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 ...
0
votes
1answer
92 views
+50

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
votes
0answers
30 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
0answers
14 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 ...
0
votes
0answers
10 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"); ...
0
votes
0answers
11 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 ...
-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
23 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, ...
0
votes
0answers
13 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
0answers
6 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 ...
6
votes
1answer
63 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
10 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
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
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 ...
0
votes
0answers
18 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() { ... } // ...
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 ...
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
23 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 ...
2
votes
0answers
95 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
19 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, ...
0
votes
1answer
21 views

Pass A Value From Outside To A Plugin Variable

Is there a way to pass a custom variable value from outside like from functions.php to a plugin's variable? Lets say that I have the following function defined in a plugin. function plugin_funct(){ ...
0
votes
1answer
16 views

Settings in functions.php used by a plugin

I'm writing a simple plugin and want some settings in an array in the functions.php file. I'm thinking of adding this in the theme functions.php $test = array('haha' => 'hehe'); my_function( ...
0
votes
0answers
15 views

filter wptexturize doesn't work on old posts titles

I have an add_filter('the_content', 'wpt_content');. My function wpt_content does a wptexturize($text). But It's work only on save post, so my old post has bad 'and my new post ’. I don't ...
0
votes
1answer
32 views

How can I remove the “Add New” button in my custom post type?

I have many custom post types that need the Add [custom post type] feature but I have a custom post type of "About" and I do not need to "Add New" about to the about custom post type. So I want to ...
0
votes
0answers
9 views

How can filter for category children?

Following my previously problem (can you see here Problem when I try to insert pagination For these problem, I needed a "category-blog.php" file and the filter and the navigation works. But How can ...
0
votes
0answers
13 views

Exists filter or action that change Add New Post link?

I want to know if exists some method from filters or actions to change the link of the Add New button in backend , for example the regular url is http://wordpress_install/wp-admin/post-new.php but I ...
0
votes
0answers
25 views

restrict_manage_posts for users?

restrict_manage_posts is great for allowing me to filter posts by taxonomy on the admin page. Is there any way of using a similar function for the users admin page - so I can filter by user meta data ...
0
votes
1answer
22 views

Add posts to WP Query object

I need to filter the WP_Query object by adding some posts to it. I have the posts id's (from another SQL query). What would be the way to add (merge) new posts into the WP_Query object?
1
vote
1answer
65 views

Remove function or filter

Im working with a child-theme of Wordpress-Bootstrap by 320press.com I want to get rid of the lead class added to the first paragraph of the content. I looked in Wordpress codex in these articles: ...
2
votes
1answer
72 views

Am I using the right hook for removing quicktags on the admin TinyMCE?

This is more of an excercise than something for a client. Anyway, I'm trying to disable the quicktags when you're on the dashboard and you click on Comments > Edit Comment. On that screen, there's a ...
4
votes
1answer
71 views

What is the most efficient way of querying posts based on visits and date for current day?

I am about to develop a piece of code for my site to display the most popular posts of the day that are X days old. I would like some help from you to achieve this the most efficient way. This is ...
0
votes
0answers
37 views

Display a post based on its metabox selection

I created a client portal where a client can view their projects. I have two user accounts "Clients" and "Administrator. Both clients and administrator are redirected to the frontend of the site to a ...
0
votes
1answer
30 views

Post Type Upload Directory - {post_type}_upload_dir filter

I'm working with modifying the upload directory depending on which post type is being uploaded to. I've ran across this question: Post type specific upload folder in 3.5 and one of the lines confused ...
0
votes
1answer
42 views

How to enable visual editor when editing comments on the dashboard?

For editing a comment in admin pages the editor is only html, can we modify the edit comment page with a filter to include visual editor too?
0
votes
0answers
91 views

Multiple Ajax Data Action

From this tutorial, how to create multiple data on ajax action in the code below? <script> function term_ajax_get(termID) { jQuery("a.ajax").removeClass("current"); ...
1
vote
1answer
45 views

How to return only one instance of each, from the entire loop

I´m adding a filter function in a taxonomy archive template. The intention is to add URLs for filtering in a sidebar, and i want it to return a set of ACFs like zipcode etc... (postnr in this example ...
1
vote
0answers
27 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 ...
0
votes
0answers
151 views

Multiple AJAX filter posts on click based on category

I tried this tutorial. I'm having problems. Can this be implemented in two filters with the same kategory? I mean, I want to separate the products popular and latest products. But the same category. ...
0
votes
1answer
19 views

Accepted arguments value in hook functions

Let's say I have the following hook function: function my_function() { $post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : ''; if( !isset( $_REQUEST['mode'] ) ) $_REQUEST['mode'] ...
0
votes
1answer
19 views

Use a filter from a class function?

How can i use add_filter within a class function? this doesn't seem to work class ClassA { .... function my_custom_upload_dir($dir) { return array( 'path' => ...
1
vote
1answer
135 views

WP Admin default view mode for Custom Post Type

To change it globally to excerpt for every post type I can use: function my_default_posts_list_mode( $default ) { return 'excerpt'; } add_filter( 'default-posts-list-mode', ...