• I have a custom theme that I inherited theme maintenance and updating for. I added a new dropdown page and have to add the link to the page through the Theme Function so that it will show up on the dropdown menu. However, I was informed that they wanted the dropdown menu to read Yacht Broker’s Bio and not Yacht Brokers. So I went into the Editor Theme Functions and added into the code the ‘s Bio. However, using the ‘s in the coding messed the entire coding up and crashed the website completely. I had to go into the control panel to then edit the php coding from there since I no longer could gain access to WordPress.

    Does anyone know how I can use the ‘s in the Editor Theme Functions?

    Below is an example of the coding in the Theme Functions

    $subnavarray[‘yacht-sales’][] = array (‘title’ => ‘Yacht Sales’, ‘url’ => ‘/yacht-sales/’);
    $subnavarray[‘yacht-sales’][] = array (‘title’ => ‘Yacht Brokers Bio’, ‘url’ => ‘/yacht-sales/yacht-brokers/’);

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you tried escaping the apostrophe character?

    $subnavarray['yacht-sales'][] = array ('title' => 'Yacht Broker\'s Bio', 'url' => '/yacht-sales/yacht-brokers/');

    Thread Starter Kamalapaton

    (@kamalapaton)

    Thank you for the suggestion. I ended up adding the ' for just the apostrophe I wanted to add to the title and it worked. Thank you for the idea!

    $subnavarray[‘yacht-sales’][] = array (‘title’ => ‘Yacht Broker's Bio’, ‘url’ => ‘/yacht-sales/yacht-brokers/’);

    Thread Starter Kamalapaton

    (@kamalapaton)

    That is funny, it changed the coding & # 39 ; to an apostrophe. Anyways, it works great now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Apostrophe in Editor Theme Functions Crashed Site’ is closed to new replies.