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

learn more… | top users | synonyms (5)

2
votes
1answer
513 views

How to Auto Approve Comments on a Specific Page?

I am using WordPress comments on a page as a Contact page and I am able to show those comments only to logged in admin. Now I would like to automatically have any comments placed on my Contact page ...
0
votes
0answers
30 views

I can get the permalink or the excerpt to work correctly, but not both

I'm calling the following code from within a filter hook. (I'm using the_ rather than get_the for bugsquashing clarity.) function test_function($output, $format, $link, $post, $adjacent) { ...
0
votes
0answers
17 views

Why none of xmlrpc filters work

I disabled all of the plugins and used fresh install of wordpress but it seems none of xmlrpc filters works for me... . for example add_filter( 'xmlrpc_wp_insert_post_data', 'ffff' ); //or ...
0
votes
1answer
14 views

I've set up an extra field for all the available widgets. How do I show it's value in the front-end?

Thanks to another great post here I managed to set up an extra field (called "subtitle") for all WP Widgets. Now I am trying to make all WP widgets display the value of this extra field (naturally, ...
0
votes
0answers
21 views

Filtering by custom fields select?

I have a custom template listing all the posts under a category x. This is how my current loop looks like: <?php query_posts('cat=522'); while (have_posts()) : the_post();?> All the ...
0
votes
0answers
31 views

apply_filters to remove some text within excerpt

I created this code below to remove all image captions in an excerpt, but it doesn't work. The image caption text is within the <em></em> HTML tags and I created this regex to remove the ...
1
vote
0answers
48 views

WooCommerce email shipping text value

I'm attempting to use the 'woocommerce_order_shipping_to_display' filter to show 'Free' in the WooCommerce email table when no shipping charges will be incurred. In the image, I'm trying to get 'Flat ...
1
vote
1answer
21 views

Inserting Category programmatically

I am wondering how should i insert the category programmatically and it should insert only 1 time after the theme is activated. I know up to here. function example_insert_category() { ...
48
votes
3answers
14k views

Disable emojicons introduced with WP 4.2

So WP 4.2 introduced emojis (smileys) that basically adds JS and other junk all over your pages. Something some people may find shocking. How does one completely erase all instances of this?
0
votes
1answer
27 views

Echo string in admin panel footer beside version no

can anyone help me out about how to showing something lets say "Hello World" beside the version no that shows up in the wp admin dashboard footer? I've already tried the action named admin_footer and ...
0
votes
0answers
37 views

Insert a custom taxonomy as a class in acf gallery loop

I am almost there, but not sure how to echo out a custom taxonomy as a class into my div containing my image. (see all the stuff below). All of the tutorials I see talk about using wp_query and then ...
0
votes
2answers
106 views

ACF Gallery with Media Categories - how do display categories and sort

I would like to use something to filter images within an ACF Gallery. I have added the Enhanced Media Gallery Plugin which will allow me to assign a category to each image, but am not not clear on how ...
19
votes
7answers
28k views

remove empty paragraphs from the_content?

Hey guys, I simply want to prevent the creation of empty paragraphs in my wordpress post. That happens quite often when trying to manually space content. I don't know why this doesn't take effect? ...
0
votes
1answer
29 views

How to change default text for specific post type

Prelude: Let's say the text "Comments are closed" is a default WP String and you wanna change that text string to something else like "Hello World!" if is_singular('post-type') is true. Issue: Now, ...
1
vote
0answers
58 views

Comment search plugin

I want to develop a plugin which places a search input field above the first comment on the post pages, filters the comments below that post, and only shows the comments which include the string that ...
0
votes
0answers
12 views

How do i get the menu id currently being edited in the nav-menus.php page?

I am trying to get the ID of the menu currently being edited in the backend menus page( nav-menus.php ) under appearance. Is there any filter that returns the id of the current menu being edited ?
0
votes
0answers
31 views

price filter for easy digital download

i have a website with easy digital download plugin, but this plugin not have a price filter like woocommerce. i have search on google and i have found this free and paid plugin ...
0
votes
1answer
32 views

Add PHP code after title in single post pages?

I tried to add PHP code after the post title in single post pages by adding a filter to functions.php, but this did not work: function theme_slug_filter_the_content( $content ) { $custom_content ...
0
votes
2answers
41 views

Modify WP_Post before processing

I am looking for a way to modify WP_Post object before it's processed and displayed on the page. Reason - I built my site when WP was still in version 2.0, or even earlier. I didn't attend to it for ...
0
votes
0answers
108 views

Dynamic attachment WooCommerce Follow-Up Emails

I am using the WooCommerce Follow-Up Emails plug-in for my clients website. With this plug-in, I send a e-mail directly after the order has been finished, containing a custom template with WooCommerce ...
0
votes
1answer
31 views

override filter in a plugin

I am trying to remove two contactmethods that were set by a plugin. I've read a lot about adding/removing an action, but found little on adding/removing a filter. Original plugin code: function ...
0
votes
2answers
20 views

Check filter defined or not?

Is this possible to find out whether add_filter( 'allow_major_auto_core_updates', '__return_true', 1 ); already added or not in some other plugin? or can i check this automatic updates set for ...
0
votes
1answer
30 views

How can I get the default content of WordPress post?

Is there a way where I can get the default output of the_content in WordPress post? Some of the plugin is using add_filter to the content to add their desired result like related post plugins where ...
0
votes
1answer
27 views

Filter Content on all Post Types

I had this idea to introduce a 'post type footer' using Advanced Custom Fields so that my users could set up common, reusable messages or calls to action and have them appear after the content of a ...
1
vote
0answers
91 views

Filtering posts list table

My post_type is 'part'. I created a custom field 'Images' this way (simply added new columns to the array): add_filter( 'manage_edit-part_columns', 'my_columns_filter' ); function my_columns_filter( ...
3
votes
4answers
3k views

How to publish a post with empty title and empty content?

Why I'm doing this you might ask? I'm developing a website for a business with a portfolio where the gallery items are posts. These posts are populated through custom fields and category selections, ...
1
vote
0answers
63 views

Customize WordPress Media Manager - Media Window

Im trying to customize the wordpress media manager "add media" window to get it as simple as possible to use. So i want to disable/ hide the following fields/ functions because i dont need some or ...
-1
votes
1answer
45 views

add_filter > posts_where works partially

I started to work with this code: Used with meta_query in query_posts works slowly and i changed the code and started to work with add_filter function filter_where($where = ''){ global $wpdb; ...
1
vote
2answers
93 views

How can I add an Author filter to the Media Library?

By default the WordPress Media Library allows you to filter results by their type or date. How can I add a third drop down to list and filter by author? Currently we have this: I'd like to have ...
0
votes
1answer
432 views

WP REST API v2. filters doesn't work

I'm using WP REST API v2 to get posts. When I tried to open localhost/wp-json/wp/v2/posts in my browser I got json with all my posts. I tried to open ...
0
votes
1answer
54 views

How to add post_distinct filter to WP_Comment_Query?

I want to fetch a list of posts with the most recent comments. However I don't wish to simply get the latest comments and have duplicate posts, but I want to group the posts (by their ID). I tried the ...
0
votes
0answers
61 views

Used with meta_query in query_posts works slowly

Hey i have a problem this my code and if i used with all parameters i get from $_GET its start work so slowly..... (like 5 min). $checkbox = array( 'immediate'=>'כניסה מידית', ...
0
votes
1answer
71 views

Simple Share Buttons Add Plugin and Custom Post Type

First of all Simple Share Buttons Add is a great plugin to share WordPress contents to social media. Nonetheless, I encountered an issue with it. It is not possible to disable these button on custom ...
0
votes
1answer
84 views

How to override filter in child theme?

I'm trying to override a parent theme filter in a child theme; I must have the syntax wrong as the override is being completely ignored. Here's what's in my child theme's functions.php: //* remove ...
2
votes
4answers
520 views

Filter link to existing content suggestion

How can i filter the link given in "link to existing content". Eg: As in the above image. I just want WSP BANNER TO BE SHOWN. where WSP BANNER & CALENDAR are custom POST types Any help will ...
0
votes
1answer
67 views

remove/hide wp-editor

I have created a meta-box for a certain page_template. So if the adminpage is loaded with the template it shows the metabox. This does not require the wp-editor to add content. So I would like to ...
0
votes
0answers
15 views

Store Variable to be used Across Admin All Post Page

In the main taxonomy admin page (All page, All post, WooCommerce Orders, etc.) I am looking to store a variable to be stored for the page and then be used by a filter for each individual item row. ...
0
votes
0answers
8 views

Wrap <figure> for image inser from url?

I have checked here Always use <figure> for post images but it is not used when I insert image from url, it appears like normal in editor not wrap figure tag. Someone can help me ?
2
votes
2answers
226 views

Overwrite default WordPress wording

I'm working on a plugin that changes the password requirements to be a bit stricter, however wherever there is a password field to create a password, WordPress' hints are now no longer accurate (e.g. ...
0
votes
0answers
40 views

WordPress registration: checking external database to see if name/email exists, then show error message

During registration (creating a new user account), in addition to checking the wordpress database, to see if user name or email already exist, I want to also check an external database. My code ...
0
votes
2answers
1k views

Editing wp-config.php

I need to add the line define('WP_POST_REVISIONS', false); to my config.php , so that post revisions are disabled. I don't have access to wp-config.php, I have permission to edit my theme and ...
0
votes
1answer
40 views

How do I hide tinymce within the edit screen of a particular page

I have a page. The page is assigned a unique page template. The template will use a custom loop. This loop will not call the content of the particular page. I'd like to hide tinymce from the user. ...
0
votes
0answers
35 views

Cron schedule interval through plugin options?

My plugin sets up a CRON job on plugin activation to run after every 5 minutes. I want to provide a section in my plugin settings page, where the user can specify an interval. How would I do it? I am ...
0
votes
0answers
28 views

Checking if text from product 2 is equal to product 1

I am using Woocommerce product addons to allow users to upload a pdf file when ordering 2 products. I would like the following logic to be applied when both items are in the cart. If filename ...
0
votes
1answer
17 views

Getting entry ID from frm_email_message filter in formidable

Using the filter frm_email_message in formidable I want to change the message body in an email but I need to get the entry id. I can get it using a different filter frm_email_value. Is there a way ...
1
vote
0answers
155 views

add_filter hook redirect view cart button in woocommerce

In my current multilanguage wp project I'm trying to redirect the user from the checkout (which is in the current language choosen by the user) via "view cart"-button to a translated cart page. ...
0
votes
0answers
62 views

How to get to the date of the uploaded file

Anyone can tell which is the filter (if there is any) used for the date of an uploaded file. This can be useful to limit the upload for the users based on the time.
1
vote
3answers
96 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 ...
0
votes
0answers
47 views

how to find add_filter hook name?

I'm using jetpack photon. but it's not cache sidebar widget's image. so I found this code function jeherve_photonize_text_widget_images( $content ) { if ( class_exists( 'Jetpack_Photon' ) ) { ...
0
votes
0answers
12 views

Which filter called the function [duplicate]

I've created a function that does some replacing of urls and is called by several filters: add_filter( 'theme_root_uri', array( $this, 'replaceCDN' ), 99, 1 ); add_filter( 'plugins_url', array( ...