Tag Info

New answers tagged

0

Yes sure you can achive that simply using enter_title_here filter hook. add_filter('enter_title_here', 'my_title_place_holder' , 20 , 2 ); function my_title_place_holder($title , $post){ if( $post->post_type == 'portfolio' ){ $my_title = "Add new Portfolio"; return $my_title; } return $title; ...


0

If you mean Links in admin menu then run /wp-admin/options.php find key link_manager_enabled and set value to 1. Save.


1

This is probably a bit better (same concept but modified): *Edit: New modified version on Github that supports images with links - https://github.com/wpexplorer/wpex-auto-link-titles/blob/master/wpex-auto-link-titles.php function wpex_auto_add_link_titles( $content ) { // No need to do anything if there isn't any content if ( empty( $content ) ) { ...


2

You can change it via the category template (if you have multiple category templates you'll need to edit all of them; if you have archive.php, you need to edit it only there). Otherwise you can use the Yoast SEO plugin which have settings for naming the archives (actually I think that almost all SEO plugins have those settings).


1

As you have stated, rank is defined by a value in a custom field, so you would just need to get the value from the custom field and display it. You can try the following inside your loop global $post; // Just make sure the custom field name is correct $rank = get_post_meta( $post->ID, 'custom_field', true ); // Display the title and rank echo 'Rank ' ...


0

I figured out a way to do this using the dashboard, not coding needed. BOOM! :) I was over thinking this. Step 1: Go to the page in the dashboard and edit the title to what you want. Update the page. Step 2: Goto Appearance>Menus and select the page with the coma in the name and click on the down arrow on the left, delete the coma (or whatever it is). ...


0

I believe you can alter that with a filter on wp_title but you don't provide enough detail about your project to really get a good answer. There is sample code in the Codex: https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_title


0

Here's how we've done it, in order to change only a specific custom post type: /* edit the admin page title for a particular custom post type */ function edit_page_title() { global $post, $title, $action, $current_screen; if( isset( $current_screen->post_type ) && $current_screen->post_type == 'CUSTOM-POST-TYPE' && $action == ...


1

Just use the the_title filter to hook into the title content and work with that. add_filter( 'the_title', function( $title ) { // Manipulate the $title as you want and then return that. // You can add test conditions such as 'is_main_query' // (https://codex.wordpress.org/Function_Reference/is_main_query) return $title; } );


0

It turns out I just needed to return the $title variable which already had what I needed: function woocommerce_endpoint_titles( $title ) { $sep = ' | '; $sitetitle = get_bloginfo(); if ( is_wc_endpoint_url( 'view-order' ) ) { $title = 'View Order: ' . $sep . $sitetitle; } if ( is_wc_endpoint_url( 'edit-account' ) ) { ...



Top 50 recent answers are included