Jump to content

Need help with STR REPLACE function...easy one


becoolufull

Recommended Posts

I am having a wordpress blog....What I want is need to remove :(colon) from a link

 

 

Now when the my post page executes the <?php wp_title('', true, 'right'); ?> will fetch the title of the page.

 

This also fetches :(colon) in the title which I need to remove in this link

 

www.mysite.com/<?php wp_title('', true, 'right'); ?>

 

How can I do this?

www.mysite.com/<?php str_replace(":", "", wp_title('', true, 'right')); ?>

 

Given that it returns the title and not echos the title. If it echos it, either find a function that returns it, or use output buffering ob_start to grab it by creating your own function for it. Not being a WP Guru, yea.

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.