Support » Plugin: Fundify Crowdfunding (Moved) » Add category field to Edit/Submit Campaign?

  • Hi!

    I would like to add a Categoy field to the Edit/Submit Campaign.
    So far I have made ​​the following changes in shortcode-submit.php file :
    – I added this line in the register_fields() function:

    'category' => array(
    				'label'       => __( 'Category', 'atcf' ),
    				'default'     => null,
    				'type'        => 'select_cat',
    				'editable'    => false,
    				'placeholder' => null,
    				'required'    => true,
    				'priority'    => 6
    			),

    – I added this line in the function __construct() :
    add_action( 'atcf_shortcode_submit_field_select_cat', 'atcf_shortcode_submit_field_select_cat', 10, 4 );
    – I created the function to generate the html code:

    [...]
    ?>
    	<p class="atcf-submit-campaign-<?php echo esc_attr( $key ); ?>">
    		<label for="<?php echo esc_attr( $key ); ?>"><?php echo apply_filters( 'atcf_shortcode_submit_field_label_' . $key, esc_attr( $field[ 'label' ] ) ); ?></label>
    
    		<select name="<?php echo esc_attr( $key ); ?>">
    
    		<?php
    				$terms = get_terms( 'download_category' );
    				if ( count( $terms ) > 0 ) {
    						/*echo "<option value=''>" . __( 'Show all categories', 'edd' ) . "</option>";*/
    						foreach ( $terms as $term ) {
    							$selected = isset( $_GET['download_category'] ) && $_GET['download_category'] == $term->slug ? ' selected="selected"' : '';
    							echo '<option value="' . esc_attr( $term->slug ) . '"' . $selected . '>' . esc_html( $term->name ) .' (' . $term->count .')</option>';
    						}
    				}
    		?>
    		</select>
    	</p>
    <?php
    }
    [...]

    The problem is, like you will know, that actually the selected category is stored in the BBDD as a extra field (campaign_category) but not as the real category.
    Can you help me please?
    Thank you!

    http://wordpress.org/plugins/appthemer-crowdfunding/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi dlt0rre,

    If another user would like to provide input, they are more than welcome. On our end, customization support of any kind is outside the kind of support we provide.

    Thanks!

    thanks, I got it.

    @interetinter so are you saying there is no way to categorize a campaign from the front end? Or have i missed a setting??? What about when i have 100s of campaigns running? Is an admin supposed to go in and manually categorize them all?

    @dlt0rre did you figure out a solution to this in the end. I HAVE to have front end categorization!

    Also interested in how this was solved. @dlt0rre ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add category field to Edit/Submit Campaign?’ is closed to new replies.