Modify WordPress search behaviour in backend?
Modify WordPress search behaviour in backend?
Modify WordPress search behaviour in backend?
If you look in core, that filter is applied like so: $image_meta = apply_filters( ‘wp_calculate_image_srcset_meta’, $image_meta, $size_array, $image_src, $attachment_id ); Instead of using __return_empty_array you need to add a custom function to that filter to remove the srcset size you are trying to get rid of. Something like this. function my_srcset_function($image_meta) { if (!is_array($image_meta)) { … Read more
Removing the action is really what I intended as I’m not replacing the title. changing my last line to this works for what I was intending. remove_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 );
This is not the full working code, just to illustrate how to add the shortcode and trigger the function. <?php // Check if ACF is available if(function_exists(‘get_field’)) { function modell_nach_personenzahl_variabel() { $args = array( ‘post_type’ => ‘womos’, ‘order’ => ‘ASC’, ‘orderby’ => ‘personen’, ‘field’ => $atts[‘personen’], ‘numberposts’ => -1, ‘meta_query’ => array ( array ( … Read more
Based on your edits, you want one function to apply to two different filters. All you need to do is use the same function on both filters. I haven’t tested this, but it should work: function content_image_markup($content) { if( !empty($content) ) { // example of changing the content $content=$content . ‘ append this to content’; … Read more
So I’ve solved the issue by looping through all of the items by class and indexing them with a data attribute. $( ‘.tiled-gallery’).each(function(){ var i = 0; $(this).find(‘.tiled-gallery-item’).each(function(){ $(this).attr( ‘data-index’, i ); i++; }) })
Have you already used this image in a different post? The post_parent may already be assigned to a different post ID from the one you are on. The code you have will only return images uploaded to this post first. I’ve seen a few regex type solutions to this problem, however I think PHPs DOMDocument … Read more
How to filter page title for certain page?
oembed_dataparse filter not running at all for standard YouTube embed
In the Widgets section, this particular btn_text is set to [and always will be] Download Latest Update. I have a function that collects some version information that I want to append after the default btn_text, ie. Download Latest Update **v1.0.11(2019)** The widget has a filter named button_text which you could utilize to customize the button … Read more