Using strpos() for Menu Sections
-
Hi. I’m running a very complex operation with this plugin, so I apologise in advance.
Basically my Menus sections contain dates which I don’t want to be displayed to the public. I was planning on using PHPs strpos() function to remove the dates from the section headers in a format like this;
if strpos($this->menu_section, "Starters") { echo substr($this->menu_section, -8); } elseif strpos($this->menu_section, "Main") { echo substr($this->menu_section, -4); } elseif strpos($this->menu_section, "Dessert") { echo substr($this->menu_section, -7) }
So for example “26th April 31st May 14th June 20th September 11th October Main” would be displayed as just “Main”
However I’m not sure where in the plugin the menu section headers are printed/echoed. Could anybody help guide me on this one?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Using strpos() for Menu Sections’ is closed to new replies.