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

learn more… | top users | synonyms (5)

1
vote
0answers
17 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
8 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
0answers
27 views

What would be the use of an visual programming language for Wordpress?

please, ignore possible opinions but also the tremendous technical problems when looking at this question. A short background, I am developing web-based authoring software, from interface builders ...
0
votes
0answers
26 views

Manipulate a <p> element via add_filter / function.php

I would like to add a class to the following <p> tag: /** * Add Checkbox to checkout form */ function AddCheckboxToCheckoutPage() { $checked = get_option($this->GrOptionDbPrefix . ...
0
votes
1answer
13 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
13 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
25 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
10 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 ...
-3
votes
0answers
16 views

Wordpress theme with inbuilt feature of search and filter post by taxonomy [closed]

I am looking for a wordpress theme that has internal support for search and filter post by taxonomy. Something like what has been implemented in this theme but this theme has been specifically ...
0
votes
0answers
17 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
0answers
13 views

Building a filterable archive, show all results when search is empty [closed]

I'm trying to build a filterable archives page for example user could filter to show only content from a specific category, to do this I'm editing the search.php template. Problem is when I do an ...
0
votes
0answers
18 views

PHP filters on a listing page [closed]

I am asking in the hope someone cal provide a solution to below as I have no knowledge of php and have searched for hours in the hope I can find a solution to below I am creating a website - ...
0
votes
1answer
17 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
50 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
55 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 ...
3
votes
1answer
53 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
24 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
23 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
35 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
55 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
41 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
18 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
49 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
18 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
16 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
109 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', ...
0
votes
0answers
15 views

Help : how to Display only 3 random post from the most recent 100 in 120 days

that's my code : $args=array('post__not_in' => array($post->ID),'posts_per_page' => $related_no, 'orderby' => 'meta_value_num' , 'meta_key' => 'tie_views', 'post_status' => ...
0
votes
2answers
34 views

How do I hook my function to run only after submitting login form

I'm new to wordpress. I'm writing my first plugin. I don't understand how to have my function run only after submitting the login form while not running every time I refresh the login page. I tried ...
0
votes
1answer
18 views

Execute filter in theme as last

Is it possible the execute the called add_filter in theme after all plugins they've been loaded? I use one of the plugins from repository to can add the ability to define custom target links for ...
0
votes
1answer
35 views

Please explain me what the do_action does

I am trying hard to understand do_action but not understanding. I was studying the blane theme. And they have this code in sidebar.php <div id="secondary" class="widget-area col-md-3" ...
0
votes
0answers
30 views

Isotope JQuery Menu Link to a Filter in Section of One Page Website

I have an Isotope gallery on a one page parallax website. I would like to create a menu item in the header that points to a specific filter ("locations") in the gallery. Well, to be clear, this menu ...
0
votes
1answer
34 views

Disable sanitize_file_name on upload without modifying functions.php

I am looking for a way to disable sanitize_file_name function without modifying the functions.php or formatting.php. I am uploading files that have other language file names and all I am getting are ...
0
votes
0answers
16 views

Override an advanced custom fields action callback [duplicate]

I'm in the process of writing a CDN plugin for WordPress and am trying to integrate it with the Advanced Custom Fields plugin. I need to filter the output of the "File" field type on the edit post ...
0
votes
0answers
5 views

Filter get_projects_category();

Is it possible to amend the <?php get_projects_category(); ?> to only get projects from specific categories? The previous code is populating a menu with category links, and I only want certain ...
4
votes
1answer
131 views

How Can I Add a Filter to Class Instance Only?

I have a custom class which I use for several cases extending it, for example class A { public function show_things() { print_r( apply_filter( 'yet_another_filter', array( 'coffee', ...
2
votes
0answers
70 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 ...
4
votes
1answer
72 views

post_mime_types Filter not Working in List Mode

I'm using the following code to add new sorting options to my Media Library: function modify_post_mime_types( $post_mime_types ) { $post_mime_types['application/pdf'] = array( __( 'PDFs' ), __( ...
0
votes
0answers
10 views

How can I append content from another given id in the current post?

I need to append the content from a couple given post ids, into another specific pages. This is what I've tried but it's not working. The goal is to append the content from posts id 1794 and 2094 ...
0
votes
2answers
40 views

Proper way to replace the_content only for pages created by custom plugin

I'm creating a plugin that needs to replace the_content of only two specific pages that it created upon activation. Here is my code: add_filter('the_content', 'emd_content'); function ...
0
votes
0answers
19 views

Removing menu item doesn't get removed on edit post

I have removed some menu links for a basic contributor role, just that when the user access the edit post section they re-appear(wp-admin/post.php?post=24731&action=edit). What am I missing? This ...
0
votes
0answers
28 views

Custom search fields and AJAX support

I am trying to rewrite the search. I used the action pre_get_posts and the filters posts_where and posts_join. The page loads with my custom filters. But I can't make it work with AJAX. How can I make ...
0
votes
1answer
20 views

Replace header image on all other pages but home - URL issue

I've got a function working to achieve what I want on my dev server, but it will not work on the live site. I have a random image implemented via shortcode and plugin, and it must appear everywhere ...
0
votes
1answer
21 views

Filter seems to be run before another filter although priority is set correct [closed]

First of all I want to mention that these are my very first experiences with wordpress plugin development. In the following I describe what I want to do and then describe my problem. I wanna use ...
1
vote
2answers
40 views

wp_insert_post_data filter hook identify current action

I have this function to set the title of a wordpress post which works properly for saving / updating posts. The major issue is that the function stops posts being deleted (it removes the title but the ...
2
votes
1answer
37 views

How to use update_{$meta_type}_metadata filter to modify meta value

I'm trying to wrap my head around the update_{$meta_type}_metadata filter, in order to modify both post and user metadata before database insertion. After reading the docs and the core, it seems to ...
0
votes
0answers
50 views

Wordpress category filter update subcategory

I'm building a new theme and i need to have an option at the top where there are three dropdown fields which represent three unique categories. The three categories are basically ( Country, City, ...
0
votes
0answers
26 views

is_page_template() doesn't work with excerpt_length filter

I am tring to set a different excerpt lenght for the pages that use an specific page templates using excerpt_length filter. This is the code: add_filter( 'excerpt_length', 'nmd_excerpt_length', 999 ...
0
votes
0answers
40 views

How to make a wp_title filter hook change the title column in custom post types reliably

I have written code for a custom post type. The custom post type is loosely based on the cpt-bootstrap-carousel plugin, but only as far as functionality goes. My code makes use of the ...