Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.