Remove “Category Archives: title” at the top of a category page [duplicate]

The text is coming from Twenty Eleven theme’s category.php file. There are two ways to remove it: A) Removing it using a Text/CODE Editor on the File System/FTP: This is the recommended method Go to Your WordPress Installation Folder. Then wp-content/themes/twentyeleven folder. Then open the category.php file in a Text or CODE Editor. On line … Read more

Change post title during post saving process

You can hook into wp_insert_post_data and change things. <?php add_filter(‘wp_insert_post_data’, ‘wpse67262_change_title’); function wpse67262_change_title($data) { $data[‘post_title’] = ‘This will change the title’; return $data; } Obviously you’re going to have to some checks and stuff so you don’t change every post title. That hook will also fire every time the post is saved (adding a new … Read more

Setting a title on a Custom Post Type that doesn’t support titles

You could add a hidden input into the page to pre-set the title field, because it won’t be on the page(because the type doesn’t support titles). Slug is produced from the title, so you should only need add a title value. Something like this should work(though untested).. add_action( ‘submitpost_box’, ‘hidden_type_title’ ); function hidden_type_title() { global … Read more

When calling wp_title(), do you have to create some kind of “title.php” file?

The wp_title() template tag does some context-based output. From the Codex: The title text depends on the query: Single post or a Page the title of the post (or Page) Date-based archive the date (e.g., “2006”, “2006 – January”) Category the name of the category Author page the public name of the user If you … Read more

Filter the blog title displayed in the header

Remove that filter/function and apply your markup in the PHP template/page file. If you need help post where you output the title. CLASS Here is how I might set this up using a class: if ( ! class_exists( ‘ThemeCustomizations’ ) ) { class ThemeCustomizations { static $inBody = false; public static function set_in_body_true() { static::$inBody … Read more

Custom Post Type with Custom Title

You can try the following code. function custom_post_type_title ( $post_id ) { global $wpdb; if ( get_post_type( $post_id ) == ‘cars’ ) { $engine=”, “.get_post_meta($post_id, ‘Engine’, true).’l’; $terms = wp_get_object_terms($post_id, ‘brand’); $abrand= ‘ ‘.$terms[0]->name; $amodel=” “.$terms[1]->name; $title = $post_id.$abrand.$amodel.$engine; $where = array( ‘ID’ => $post_id ); $wpdb->update( $wpdb->posts, array( ‘post_title’ => $title ), $where ); … Read more

Checking for existence of a page by title?

Using get_page_by_title() along the line of below exemplary code should work: if ( get_page_by_title( $page_title, $output, $post_type ) == NULL ) { $exists = false; } else { $exists = true; } Explanation: $page_title is obviously what you are looking for; $output can be OBJECT, ARRAY_N or ARRAY – Default: OBJECT; $post_type can be specified, … Read more