WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating a custom walker class.

I need to identify the custom links that will be added to the menu from Appearace > Menu > Custom Link

so that they will have a different format to the page/post links

Any thoughts on how I can do this within walker class possibly using if statement?

something like

if (link = custom-link) {
  // Do something
share|improve this question

Test for …

$item->object = 'custom'

This is used for custom links only. $item->object is always the post type or the item type (category for example). Not sure what happens when someone registers a custom post type named custom :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.