Questions tagged «get-the-title»

3
替换管理员列表中的标题
这是我的情况:我正在尝试过滤自​​定义帖子类型编辑表中title列的内容,但无法正常工作。 这是我尝试过的: add_filter('manage_edit-mycpt_columns', 'replace_title_products'); function replace_title_products() { $oldtitle = get_the_title(); $newtitle = str_replace(array("<span class='sub-title'>", "</span>"), array("", ""),$oldtitle); $title = esc_attr($newtitle); return $title; } 我只想过滤<span>标题中的标签。有人可以帮我吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.