darktakua
Forum Replies Created
-
Forum: Plugins
In reply to: [Carbon Fields] Associating, bulk adding complex fieldsOkay so I might have a better explanation to what I want. So, in one complex field, namely
reps
, I want to input a number into a text field calleddistrictnum
. Depending on what number that is, I want to display content from thereps
complex field into another complex field, in particular,reps_tooltip
. Depending on what numberdistrictnum
is, I want to display certain content intoreps_tooltip
fromreps
. I think I could do this by grabbing a certain array value of the complex field? I’m not quite sure since I don’t know how the complex fields are set up.Forum: Plugins
In reply to: [Carbon Fields] Displaying checklist and radio contentOk, would it be
<?php if (carbon_get_the_post_meta(get_the_ID(), 'rep_verified'); ?> CONTENT <?php endif ?>
?
Forum: Plugins
In reply to: [Carbon Fields] Displaying checklist and radio contentI see! If I were to do this without a complex field how would the formatting be?
Forum: Plugins
In reply to: [Carbon Fields] Displaying checklist and radio contentYes they are.
Forum: Plugins
In reply to: [Carbon Fields] Complex Fields Separate ContentAhh okay got it. Thanks.
Forum: Plugins
In reply to: [Carbon Fields] Complex Fields Separate ContentFor the checks, for example, I wanted to do this
<?php if ( $reps = carbon_get_the_post_meta( 'reps', 'complex' ) ): ?>
but in addition toreps
, I wanted to addsenators
. Is there any way to add to that line or do I have to do another check just addingsenators
?Forum: Plugins
In reply to: [Carbon Fields] Complex Fields Separate ContentI tested it and this works perfectly! May I ask, is there a way to check for multiple
carbon_get_the_post_meta
? For example, I want to pull from both complex fields ofreps
andsenators
. In addition, I was wondering what thesanitize_title_with_dashes
did?Also, thanks so much for the help! ?? You guys have made a great plugin.
Forum: Plugins
In reply to: [Carbon Fields] Complex Fields Separate ContentHi, thanks for replying.
Yes, I am trying to display it on the front end. However, for each complex field, I would like to display it separate from each other. For instance, for the tabs at the top, as I add more complex fields, I’d like to have another
<li></li>
with the same default content with the field content changed.Forum: Plugins
In reply to: [Carbon Fields] Complex Fields Separate ContentAlso, this is the complex field code for the above:
Container::make( 'post_meta', __( 'Rep' ) ) ->show_on_template( 'states.php' ) ->add_fields( array( Field::make( 'complex', 'reps', __( 'Reps' ) ) ->setup_labels( array( 'plural_name' => __( 'Reps' ), 'singular_name' => __( 'Rep' ), ) ) ->add_fields( array( Field::make( 'text', 'rep_last_name', __( 'Last Name' ) ) ->set_width( 25 ) ->set_required( true ), Field::make( 'text', 'rep_state_abb', __( 'State's Abbreviation ) ) ->set_width( 33 ), Field::make( 'text', 'rep_dist_num', __( 'Representative District Number' ) ) ->set_width( 33 ), ) ), ) );