2017-07-04 68 views

回答

1

试试这个

function wpse125903_remove_the_first_gallery($output, $attr) 
{ 
    // Run only once 
    remove_filter(current_filter(), __FUNCTION__); 

    // Override the first gallery output   
    return '<!-- gallery 1 was here -->'; // Must be non-empty. 
} 

add_filter('post_gallery', 'wpse125903_remove_the_first_gallery', 10, 2); 
+0

工作得很好。 –

+0

高兴能帮助兄弟:) – Exprator

相关问题