becoolufull Posted June 23, 2010 Share Posted June 23, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/205645-need-help-with-str-replace-functioneasy-one/ Share on other sites More sharing options...
premiso Posted June 23, 2010 Share Posted June 23, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/205645-need-help-with-str-replace-functioneasy-one/#findComment-1076157 Share on other sites More sharing options...
bradmasterx Posted July 8, 2010 Share Posted July 8, 2010 I dont use word press but by the code you have just given inside the function wp_title is were is gets outputed? Quote Link to comment https://forums.phpfreaks.com/topic/205645-need-help-with-str-replace-functioneasy-one/#findComment-1082935 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.