Wp Admin Bar Customizing Labels

Don’t use add_filter with the_content that way; that is meant for a different context – when you are filtering a returned WP post object. Try something like this instead: function replace_customer_area_title( $wp_admin_bar ) { $newtitle = __(‘Custom Title’, ‘cuar’); $wp_admin_bar->add_node( array( ‘id’ => ‘customer-area’, ‘title’ => $newtitle, ) ); } add_filter( ‘admin_bar_menu’, ‘replace_customer_area_title’ , 33 … Read more

Ampersand breaking Widget title

SOLUTION: So, it turned out (of course) I myself was causing the problem (…) I am getting the widgets with the ‘the_widget()’ method and sending the instance params along as I go. The params are query-string-style parameters and are of course ‘glued’ together with ampersands. Now , I wasn’t encoding the individual params so the … Read more

How to remove “» (title of post or page)”?

Search your code for » and narrow down where it’s referenced. Chances are not many places. Look in all your theme and plugin folders. Even do a grep on the /wp-content folder. grep -winr ./wp-content -e ‘»’ It looks like bad php code — maybe copy/paste where the quotes didn’t match up.

How to disable publish button if post title exists

This is something you could always do with the help of jQuery Ajax, and get_page_by_title(‘About’, OBJECT, ‘post’) tool. You basically listen to changes on the title field, check if at least 1 post already exists with same title, then enable the submit button if it doesn’t, otherwise keep it disabled as it is by default … Read more

Sanitize title only if only custom post type

you want to sanitize the title or the post_name (slug)? if you want to filter post_name you can check wp_unique_post_slug filter or you can use the wp_insert_post_data filter to filter all post data before insert or update in db. add_filter( “wp_unique_post_slug”, “url_sanitizer”, 10, 4 ); function url_sanitizer( $slug, $post_ID, $post_status, $post_type ) { // get … Read more

Modify link options when hovering over post title

If you want to just hide the link in the admin area, you can add this CSS code to your admin area. Assuming that the extra link is the LAST one in the row, add this code to you theme’s functions.php file: add_action(‘admin_head’, ‘my_custom_fonts’); function my_custom_fonts() { echo ‘<style>.row-actions span:last-child {display:none} </style>’; This will hide … Read more

Front page displays different than all other pages?

I’m not very sure how is your title on other pages, but here is how you can modify your title: <?php wp_title( ‘|’, true, ‘right’ ); ?> This will show your Blog’s name right to your page’s title, which will have seo benefits. The | separator will be used here. If you want to customize … Read more

How can I insert a shortcode in the title tag of another?

No, you can’t do that, as the title argument is passed as a string. Given the information you provided, I suppose that your [dt_fancy_title] shortcode does not actually execute shortcodes. The syntax for this function should be: function dt_fancy_title_callback( $params, $content = null ) { // extract the title argument from the params, setting default … Read more

Split site title and apply different classes

Figured it out! function split_title($title) { $title = get_bloginfo(‘name’); $word = substr($title, 0 , 5); $press = substr($title, 5); $html = “{$word}<span class=”bold”>{$press}</span>”; return $html; } And then <?php echo split_title($title); ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)