php - Remove Wordpress title from parent theme -


this bit of rehash of previous question asked, have clearer idea of i'm asking...

i have following code, in parent theme , generates tag site... located in directory: themes/kalium/inc/laborator_filters.php

// title parts function kalium_wp_title_parts( $title, $sep, $seplocation ) {     $kalium_separator = apply_filters( 'kalium_wp_title_separator', ' – ' );      if ( empty( $sep ) ) {         return $title;     }      $title_sep = explode( $sep, $title );      if ( ! is_array( $title_sep ) ) {         return $title;     }      if ( $seplocation == 'right' ) {         $title = str_replace( $sep . end( $title_sep ), $kalium_separator . end( $title_sep ), $title );     } else {         $title = str_replace( reset( $title_sep ) . $sep, reset( $title_sep ) . $kalium_separator, $title );     }      return $title; }  add_filter( 'wp_title', 'kalium_wp_title_parts', 10, 3 ); 

so, i'm trying disable child theme functions.php file using following code no success:

remove_filter( 'wp_title', 'kalium_wp_title_parts', 10, 3 ); 

i tried adding inside own function so:

add_action( 'after_setup_theme', 'remove_head_title', 0 );      function remove_head_title() {          remove_filter( 'wp_title', 'kalium_wp_title_parts', 10, 3 );     } 

still no success.

i have tried copy original code functions file make alterations, didn't work.

can see i'm going wrong? getting rid of ideal happy copy child theme can alter it?

--------- update ----------

ive updated code the following:

add_action( 'after_setup_theme', 'remove_head_title', 0 );      //change page title add_filter( 'wp_title', 'change_page_title', 1000 );  function change_page_title($title) {    $title = 'wrgergdg'; // set new title here     // $title = ''; // or set title empty string    return $title; } 

but still doesn't seem working...

remove_filter accepts 3 arguments

remove_filter( $tag, $function_to_remove, $priority ); 

remove last argument code.

update

//change page title add_filter( 'wp_title', 'change_page_title', 1000 );  function change_page_title($title) {    $title = 'new title'; // set new title here     // $title = ''; // or set title empty string    return $title; } 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -