Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add menu_position #59

Closed
WebbizAdmin opened this issue Feb 20, 2016 · 4 comments
Closed

Add menu_position #59

WebbizAdmin opened this issue Feb 20, 2016 · 4 comments

Comments

@WebbizAdmin
Copy link

Tried to add the CPT higher on the menu.

function menu_position( $position = 5) {
    $this->options["menu_position"] = $position;
}

This works.

@jjgrainger
Copy link
Owner

This is achievable with the options passed when creating the post typ:

$books = new CPT('book', array(
    'menu_position' => 5
));

But I can see how adding an additional method may be useful. I'll consider it in the next release.

Thanks :) 👍

@WebbizAdmin
Copy link
Author

Ah ok, is there any difference in what I have done? is it better to do your route?

Thanks
Jason

@jjgrainger
Copy link
Owner

@WebbizAdmin No, they both pretty much achieve the same thing with the same option, just a slightly different way. Just the version I've provided is already available.

I think you're onto a winner, the options passed when creating the post type is quite a large array, so it could be useful to break it up with some additional methods in the class. For example labels() could be another one.

Thanks, :)

@WebbizAdmin
Copy link
Author

Cool, Great class you created by the way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants