Title: martnick's Replies | WordPress.org

---

# martnick

  [  ](https://wordpress.org/support/users/martnick/)

 *   [Profile](https://wordpress.org/support/users/martnick/)
 *   [Topics Started](https://wordpress.org/support/users/martnick/topics/)
 *   [Replies Created](https://wordpress.org/support/users/martnick/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/martnick/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/martnick/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/martnick/engagements/)
 *   [Favorites](https://wordpress.org/support/users/martnick/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Carbon Fields] Complex field with relations, adding extra rows to db](https://wordpress.org/support/topic/complex-field-with-relations-adding-extra-rows-to-db/)
 *  Thread Starter [martnick](https://wordpress.org/support/users/martnick/)
 * (@martnick)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/complex-field-with-relations-adding-extra-rows-to-db/#post-7681934)
 * Hey guys, sorry for the late response. Everything is great now. Thank you once
   again!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Carbon Fields] Complex field with relations, adding extra rows to db](https://wordpress.org/support/topic/complex-field-with-relations-adding-extra-rows-to-db/)
 *  Thread Starter [martnick](https://wordpress.org/support/users/martnick/)
 * (@martnick)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/complex-field-with-relations-adding-extra-rows-to-db/#post-7681754)
 * Thanks for the fast response, I will play around with this, and will contact 
   you as soon as possible on my progress. Cheers.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Carbon Fields] After save theme hook not working](https://wordpress.org/support/topic/after-save-theme-hook-not-working/)
 *  Thread Starter [martnick](https://wordpress.org/support/users/martnick/)
 * (@martnick)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/after-save-theme-hook-not-working/#post-7634307)
 * [@htmlburger](https://wordpress.org/support/users/htmlburger/) No, I was dumb.
   With exit it works perfectly. Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Carbon Fields] User Container on custom pages](https://wordpress.org/support/topic/user-container-on-custom-pages/)
 *  Thread Starter [martnick](https://wordpress.org/support/users/martnick/)
 * (@martnick)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/user-container-on-custom-pages/#post-7622301)
 * Hello [@htmlburger](https://wordpress.org/support/users/htmlburger/),
 * First off, thanks you all for the great plugin, it does me wonders, you answer
   sums it up pretty much, you can resolve the topic.
 * I have worked on this before you answered, I went with a spin on the first approach.
   I am using the Carbon Fields plugin, to make it so, the administrator can add
   roles and “fields” to the roles. For those who are interested, I made a couple
   of theme_options container. One to add remove roles, and one to add “fields” 
   to the roles.
 * The first:
 *     ```
       Container::make('theme_options','Plugin Options')
       	->add_fields(array(
       		Field::make('complex', 'roles')
       			->add_fields(array(
       				Field::make('text','display_name','Display name'),
       				Field::make('text','role_name','Role name'),
       				Field::make('complex','capabilities','Caps')
       				->add_fields(array(
       					Field::make('text','capabilities_text','Cap. name')))
       				))
       		));
       ```
   
 * The second:
 *     ```
       $roles = carbon_get_theme_option('roles','complex');
   
       $dynamic_roles_container = Container::make('theme_options','Plugin Roles Options')
       	->set_page_parent('Plugin Options');
   
       for($i = 0; $i < count($roles); $i++) {
       	$dynamic_roles_container->add_fields(array(
       		Field::make('separator',$roles[$i]['role_name'] . 'role_separator',$roles[$i]['display_name'])));
       }
       ```
   
 * Then you just call the fields by user role and ID.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Carbon Fields] After save theme hook not working](https://wordpress.org/support/topic/after-save-theme-hook-not-working/)
 *  Thread Starter [martnick](https://wordpress.org/support/users/martnick/)
 * (@martnick)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/after-save-theme-hook-not-working/#post-7634305)
 * Hello [@htmlburger](https://wordpress.org/support/users/htmlburger/),
 * How can I be sure that the hook is firing? It doesn’t print anything. If I am
   adding the containers after adding the hook, could that be the problem?

Viewing 5 replies - 1 through 5 (of 5 total)