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

learn more… | top users | synonyms (5)

0
votes
0answers
161 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
2answers
159 views

How do I use the 'http_request_host_is_external' filter

I'm having a really hard time trying to use the http_request_host_is_external filter. For some background, I'm trying to set up a separate server to handle private plugin and theme updates. The ...
1
vote
1answer
446 views

Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”

Good morning, I am trying to change name format that Wordpress uses to rename uploaded files. As I upload an image whose filename is "desert-landscape.jpg", Wordpress will set up scaled versions and ...
0
votes
1answer
33 views

Plugin default settings hook

I am writing a plugin where I want it's default settings to change in accordance to the theme that is selected. I have it working, but would rather provide an action hook for this instead of writing ...
0
votes
1answer
189 views

Is it possible to create an action hook using do_action() within add_action()?

Is it possible to create a new action hook like do_action('my-hook-name'); inside a call to add_action();? I'm aware this code doesn't work, but I was thinking something along the lines of... ...
0
votes
0answers
16 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
1answer
39 views

Regarding post text filtering

What does this statement actually do? $text = apply_filters('the_content', $text); It follows only these ones: $text = get_the_content(''); $text = strip_shortcodes( $text ); What filter(s) is ...
2
votes
1answer
408 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
1answer
47 views

How to conditionally add a wp_filter

I have a WP filter I created that I only want to run on certain menu items. I am attempting to use - function add_nav_class($output) { $output= preg_replace('/<a/', '<a class="lsbb"', ...
0
votes
1answer
155 views

How to add nav menu items to a specific position within a menu

I'm adding login/logout links to a nav menu using the following code: function rp_add_login_logout_links( $items, $args ) { $link = wp_loginout( get_permalink( get_option( ...
0
votes
1answer
315 views

Remove CSS & JS files from Wordpress Main Page For Increase Pagespeed?

With the reference of http://stackoverflow.com/questions/12463304/wordpress-load-plugin-css-js-in-functions-php-w-conditional-tags answered by @maiorano84 i am using cforms, FancyBox, WP Page ...
1
vote
1answer
36 views

Is there a way to verified if an add_filter is already applied?

I have in my theme this filter: add_filter('widget_text', 'do_shortcode'); Now I'm developing a plugin where I have that same filter. I would like to know if is there a conditional that I can check ...
0
votes
1answer
200 views

is there a way to pass a parameter to a add_menu_page function?

I am trying to create a dynamic way of adding admin pages and submenus with different capabilities. So the first way i thought of which works BTW but is ugly is having all the pages in 1 folder and ...
1
vote
2answers
173 views

How to trigger the core WPLANG to make automatically set a language when the theme is activated? [duplicate]

I'm developing a theme especially for Bānglā blog posting, and it'd be under GNU license. I questioned about a Calendar Widget translation with some problems today, and got a comment saying: I'm ...
1
vote
1answer
69 views

How to hook some Unicode texts into calendar widget safely?

I collected a good numerals replacing function for WordPress calendar: function make_bangla_number($str) { $engNumber = array('0','1','2','3','4','5','6','7','8','9'); $bangNumber = ...
2
votes
1answer
49 views

How do I know what variables are passed in a filter/action and what their meaning is?

Something I have seen several times now and I don't understand is the following: In a theme's functions.php a function is defined and then attached to a hook, like so (simplified example): function ...
0
votes
0answers
70 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 ...
1
vote
2answers
31 views

How would go about if I just want a temporary function?

How would go about if I just want a temporary function? (It's a converter just for converting Access to Wordpress tables). I want to execute several times so therefore I want it automated, but I don't ...
0
votes
2answers
1k views

Can't change a label in woocommerce with the normal filter

// Hook in add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); // Our hooked in function - $fields is passed via the filter! function custom_override_checkout_fields( ...
0
votes
0answers
44 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 ...
1
vote
1answer
359 views

WooCommerce Custom Product Validation [closed]

I'm attempting to build a membership system in WordPress that utilizes WooCommerce with Gravity Forms and integrates with SalesForce. Can somebody give me some direction on how to properly utilize ...
3
votes
2answers
1k views

Advanced Custom Fields and Yoast SEO keyword analysis [closed]

The problem I'm having is the keyword page analysis tool doesn't read my custom fields so I am trying to figure out how to run a filter on them. I found a blog post on Yoast website here here which ...
0
votes
1answer
18 views

Wordpress - show all posts + ones with specific tag

I have 3 types of posts as below Normal posts without any tag With "featured" tag With "sold" tag On a page, I just want to show normal posts + ones with featured tag and don't want to show posts ...
0
votes
1answer
22 views

child_of not working while searching

I'm trying to limit search to a parent page and its own child pages. I've changed searchform.php adding this code: <input type="hidden" value="<?php global $post; $ancestors2 = ...
0
votes
1answer
133 views

arguments for comment_notification_text filter

From WP codex: comment_moderation_text: applied to the body of the mail message before sending email notifying the administrator of the need to moderate a new comment. Filter function ...
1
vote
1answer
108 views

Add Lightbox To WordPress Native Gallery

Is there a way to check if a gallery is linked to an attachment page or to an image file via jQuery or WP filter? I'm trying to add a lightbox to gallery image that is linked to image file. But I ...
0
votes
2answers
71 views

Filter didn't work on content class (hybrid_post_attributes)

I'm developing my new theme using Hybrid core framework and trying to add my class item on hybrid_post_attributes generated class using filter with this code. add_filter( 'hybrid_post_attributes', ...
0
votes
1answer
92 views

Search with filters and title

I would like to search in custom_post by title and by the ACF fields. So, I used the WP_Query WordPress function but I can't filter by the title, just by the filters. When I submit my form, I have ...
1
vote
1answer
41 views

Inserting above the comment template

I want to insert content, just above the comment template.I have tried all the word-press filters and hooks but failed. I want to insert the content above the comment template, I mean above all ...
1
vote
1answer
168 views

Change the footer text on the login page

I am customising the login page and would like to alter the footer text that takes the user back to the website. Ideally and as an example, changing it from the first image, to the second just below: ...
1
vote
1answer
55 views

How do I run through a Wordpress loop called from a filter function?

So I'm trying to populate an Advanced Custom Fields selectbox with a nice complicated array based off some post data. I've been trying to do this by doing a custom query and loop through the returned ...
3
votes
0answers
93 views

Hooking into wp_export filter for custom post type [closed]

I'm working with a CPT which has 5 taxonomies (tags, not categories). I am attempting to use the wp_export filter. The issue I am experiencing is when the filter is running: it appears to run it ...
0
votes
1answer
330 views

WordPress RSS feed - filter RSS content by custom field value

I can have the RSS feed url like: http://www.mydomain.com/?post_type=job_listing&job_cat=value#1&job_type=value#2&geo_country=value#3&feed=rss2 job_cat & job_type are taxonomies ...
0
votes
1answer
105 views

alternative to the_content filter

"i am using the_content filter on the category pages like cat=1" I am appending --N in the content. But due the the theme functionality it strip the content after some number of characters therefore ...
1
vote
2answers
236 views

Conditionally call add_action depending on post_type?

When building a plugin, I know that you can hook into a function to run some code like add_action('admin_footer', array($this, 'custom_function')); And within that function, test for post_type like ...
0
votes
0answers
56 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
2answers
44 views

Filter a pluggable function

The following function is pluggable as it contains a filter : // Make function pluggable/overwritable if ( ! function_exists( 'wpsight_layout_images' ) ) { function wpsight_layout_images() { ...
0
votes
1answer
509 views

Modify post filter to set custom number of posts per page and exclude child posts

I have a custom post type called "galleries," which is hierarchical. I'm using a function in my functions.php file to modify the number of posts displayed per page to 48. That part works fine, but I ...
0
votes
1answer
316 views

hook into completed image upload filter

I'm trying to run a little function to determine the luminance of an image and store that in the postmeta for that image.. I have the function working, but id like it to fire when an image has ...
0
votes
1answer
1k views

Customize WooCommerce Error Message

I would like to change the wording of an error message I see in WooCommerce. Are there any filters I can use to do this?
0
votes
0answers
67 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( ...
-1
votes
1answer
262 views

Background color and background image below element in Contact Form 7 - error tip [closed]

The idea was to make the not valid error tip that comes up when people fail to fill out a required field show up like a speech bubble. So the arrowhead image shows in the center and underneath the ...
0
votes
1answer
113 views

Very stubborn wp_register_script / add_action vs remove

I am trying to get rid of a plugin's .js file in the but it's not working. It's being called here {partial code): class awqsf{ const post_type = 'awqsf'; function __construct(){ // ...
1
vote
1answer
295 views

Add body class of category parent

I am not a coder, but I usually get by with Wordpress by doing my research and find my solution. I can't find what I need to do this time so I have attempted to crib together some code - what I am ...
3
votes
3answers
557 views

wp_mail - Remove sitename from email subject

Can some one tell me how to remove site name from email subject. As of now my email subject looks like this [sitename] - Subject goes here I want it to look like this Subject goes here I ...
1
vote
1answer
77 views

How to use manage_$post_type_posts_columns with underscore in post type?

I have a post type 'job_listing' and I want to use manage_{$post_type}_posts_columns filter in it. I tried manage_job_listing_posts_columns but it's not working because of the underscore in the post ...
5
votes
1answer
140 views

Add quick edit fields without custom colum

This question is a follow up on that answer I wrote. Let's say I want to add something to the quick edit box for the Posts post type list table. To do so, I have to add a custom column because of the ...
0
votes
1answer
776 views

How can I change the <img src> to <data-original> for lazyload wp smilies

I tried to improve my WordPress performance, and already put the content <img> with jQuery LazyLoad. Now, I got some problem in changing the smilies src, already set the theme smilies add ...
3
votes
1answer
273 views

Hook into admin post list page

So I want to create a custom admin interface for the post and page lists. I want it to be a split view with a list of posts and some data on the left, and a full editable preview of the post on the ...