Tag Info

Hot answers tagged

3

I wonder if you want to modify the HTML of the inserted image, with the image_send_to_editor or get_image_tag filters? If that's the case, then here's one example: /** * Add the data-ext-link-title and data-ext-link-url attributes to inserted images. */ add_filter( 'image_send_to_editor', function( $html, $id, $caption, $title, $align, $url, ...


3

As said in a comment, you can do this in one query. The principle here is to only display the date heading if the post date's month of the previous post does not match that of the previous post FEW NOTES Before I start, a few notes: Never use query_posts, except if you really need to break everything on a page. It not just reruns the main query and also ...


2

Updated Answer After thinking about the comment from @PieterGoosen below I've added a method of achieving the you goal by using a single query. I benchmarked the methods and the single query is faster, with the multiple query method being about 15% slower. Not a hugh margin, but every little helps, and to be honest the method can probably be refined ...


1

I figured this out. For anyone facing the same issue, I ended up using this code instead: function hi_customization_options( $wp_customize ) { $wp_customize->add_section( 'landing_page_image', array( 'title' => 'Landing Page Image', 'priority' => 35, ) ); $wp_customize->add_setting( ...



Only top voted, non community-wiki answers of a minimum length are eligible