jdp

Michigan

johnpedrie.com

Age: 25

PHP, Node, AngularJS, WordPress.

Jun
11
awarded Popular Question
May
26
accepted How to get the current git branch in shell
May
26
asked How to get the current git branch in shell
Apr
23
awarded Yearling
Apr
23
awarded Yearling
Apr
23
comment get_pages can't load pages with custom post types
It's right at the top of the page. "This function can also retrieve other post types using the 'post_type' parameter, but the type must be hierarchical like pages, or the function will return false."
Apr
22
answered get_pages can't load pages with custom post types
Apr
22
awarded Commentator
Apr
22
comment get_pages can't load pages with custom post types
@s_ha_dum, because if it's not set to true, then WordPress treats the post type like a "post", not a "page". The function docs mention that hierarchical must be true for this function to work: codex.wordpress.org/Function_Reference/get_pages
Apr
22
comment get_pages can't load pages with custom post types
Make sure that the post type has hierarchical set to true.
Apr
22
asked Custom Post Type Capabilities -- Enable Edit, Disable Create and Delete
Apr
18
awarded Famous Question
Apr
13
awarded Caucus
Mar
30
awarded Popular Question
Mar
12
awarded Notable Question
Jan
28
comment Domain won't go to https://example.com, when example.com is typed
Not that I can think of.
Jan
28
answered Domain won't go to https://example.com, when example.com is typed
Jan
21
awarded Self-Learner
Oct
20
revised $scope of Same Controller when changing Location Path
Add AngularJS to tags.
Sep
18
comment AngularJS multiple directive elements with template and broadcasting from controller
Seems to me that you've got it backwards. The directive shouldn't need to know how to respond to a save action. What happens if we wanted to reuse the directive in another context that saves data in a different way? Better I think to define a save function in the controller and inject it into the directive.
1 2 3 4 5