Post Title issue (3 posts)

  1. zeroclickmarketing
    Posted 2 years ago #

    Ok here's the deal my urls post example.com/postnameisthis
    which is perfect. Now I need my post title on the post page to do the same thing basically.

    Right now my post title says: Testing This Out

    I need it to say: TestingThisOut or testingthisout

    Any ideas how I can make that happen.

    I have read all last night and part of today about the_title and just have no clue what code to change or what files to put things in or change.

    Any help would be greatly appreciated.

  2. zeroclickmarketing
    Posted 2 years ago #

    Guess you could say trying to remove the spaces between the words of the entry title.

  3. Tomi Toivio
    Posted 2 years ago #

    Something like this?

    function my_remove_title_spaces ($title) {
    	 $title = preg_replace("/ /","",$title);
      	 return $title;
    add_filter( 'the_title', 'my_remove_title_spaces');

Topic Closed

This topic has been closed to new replies.

About this Topic