Advertisement:

Author Topic: preventing entering hyphen - on title  (Read 817 times)

bengalliboy

  • Full Member
  • ***
  • Posts: 204
preventing entering hyphen - on title
« on: October 27, 2014, 10:30:53 pm »
I am successfully able to write all the osclass posts to WordPress posts. However there is one problem, if there is a hyphen on the title, when I try to generate a link from osc to wp it does not properly work.
I managed to go to the data backend and update my s_title on the osc table however how do I prevent this for new classifieds or auto convert the title that has the hyphen to a space?
My last solution is to cron a job in the db that will do that but that is the least prefer of choice....
Please some guru help here.... :D
Thanks

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: preventing entering hyphen - on title
« Reply #1 on: October 28, 2014, 12:12:24 am »
@bengalliboy
Why you simply do not edit function in wordpress?
- you could disable hyphen using jQuery that user will not be able to add it to input
- you could create function, that manage title and when hyphen found, replace it. But not sure if you want to replace it in database or just in listing view  :-X