• Resolved Anonymous User 17836910

    (@anonymized-17836910)


    Hello,

    I was trying to remove the function twentytwenty_get_post_meta to add another which many changes, however, I am not able to quit it.

    I tried to use the following function without results:

    function remove_my_parent_theme_function() {
        remove_action('after_setup_theme', 'twentytwenty_get_post_meta');
    }
    add_action('wp_loaded', 'remove_my_parent_theme_function');

    Could you help me?

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • add_filter('twentytwenty_show_categories_in_entry_header', '__return_false'); 
    // removes category in entry header
    
    add_filter('twentytwenty_post_meta_location_single_top', '__return_empty_array'); 
    // removes author, post-date, comment count, sticky status in post head
    
    add_filter('twentytwenty_post_meta_location_single_bottom', '__return_empty_array'); 
    // removes tags in post footer
    
    Instead of using '__return_empty_array' you can also use a function to define what should actually be shown.
    
    
    function wps_display_custom_tags ($post_meta) {
    // delete meta tags you do not want to display
      return array( 'author', 'post-date', 'comments', 'sticky', 'tags');
    }
    add_filter('twentytwenty_post_meta_location_single_top', 'wps_display_custom_tags');
    • This reply was modified 4 years, 9 months ago by raffa13.
    • This reply was modified 4 years, 9 months ago by raffa13.

    it took me three hours to find the solution, I hope it will help someone

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove the function twentytwenty_get_post_meta’ is closed to new replies.