Forum Replies Created

Viewing 5 replies - 166 through 170 (of 170 total)
  • Thread Starter jojaba

    (@jojaba)

    Bonjour,
    Eh bien advanced Excerpt est exactement ce dont vous avez besoin.

    Translation :
    Question

    I would like to display excerpt with html format

    Answer

    Advanced Excerpt is exactly what you need to do that

    Thread Starter jojaba

    (@jojaba)

    Well got it to work !
    After hundreds reading agian and again, I finally saw I did a msitake in the metabox function :

    function vsaw_custom_meta() {
    	add_meta_box( 'vsaw_meta', __( 'Informations sur l\'évènement', 'vsaw-textdomain' ), 'vsaw_meta_callback', 'event', 'high' );
    }

    I forget a setting in this function :

    function vsaw_custom_meta() {
    	add_meta_box( 'vsaw_meta', __( 'Informations sur l\'évènement', 'vsaw-textdomain' ), 'vsaw_meta_callback', 'event', normal, 'high' );
    }

    😉

    Thread Starter jojaba

    (@jojaba)

    I just tried to install the plugin into another WordPress site anywhere else. The metabox doesn’t display even for the super admin…
    Something wrong with the printing of the metabox?

    /**
     * Adds a meta box to the post editing screen
     */
    function vsaw_custom_meta() {
    	add_meta_box( 'vsaw_meta', __( 'Informations sur l\'évènement', 'vsaw-textdomain' ), 'vsaw_meta_callback', 'event', 'high' );
    }
    add_action( 'add_meta_boxes', 'vsaw_custom_meta' );
    
    /**
     * Outputs the content of the meta box
     */
    function vsaw_meta_callback( $post ) {
    	wp_nonce_field( basename( __FILE__ ), 'vsaw_nonce' );
    	$vsaw_stored_meta = get_post_meta( $post->ID );
    	?>
    
    	<p class="start_date">
    		<label for="meta-start-date"><?php _e( 'Début de l\'évènement', 'vsaw-textdomain' )?></label><br>
    		<input required type="text" name="meta-start-date" id="meta-start-date" value="<?php if ( isset ( $vsaw_stored_meta['meta-start-date'] ) ) echo $vsaw_stored_meta['meta-start-date'][0]; ?>" />
    	</p>
    
    	<p class="end_date">
    		<label for="meta-end-date"><?php _e( 'Fin de l\'évènement', 'vsaw-textdomain' )?></label><br>
    		<input type="text" name="meta-end-date" id="meta-end-date" value="<?php if ( isset ( $vsaw_stored_meta['meta-end-date'] ) ) echo $vsaw_stored_meta['meta-end-date'][0]; ?>" />
    	</p>
    
    	<p class="location">
    		<label for="meta-loc"><?php _e( 'Lieu', 'vsaw-textdomain' )?></label><br>
    		<input required type="text" name="meta-loc" id="meta-loc" value="<?php if ( isset ( $vsaw_stored_meta['meta-loc'] ) ) echo $vsaw_stored_meta['meta-loc'][0]; ?>" />
    	</p>
    
    	<p class="url">
    		<label for="meta-url"><?php _e( 'URL (facultatif)', 'vsaw-textdomain' )?></label><br>
    		<input type="text" name="meta-url" id="meta-url" value="<?php if ( isset ( $vsaw_stored_meta['meta-url'] ) ) echo $vsaw_stored_meta['meta-url'][0]; ?>" />
    	</p>
    
    	<script>
    	/* The date picker displaying */
        jQuery(document).ready(function(){
        		jQuery("#meta-start-date, #meta-end-date").on("click", function() {
        				jQuery(this).pickadate();
        		});
        });
        </script> 
    
    	<?php
    }

    Thread Starter jojaba

    (@jojaba)

    Well, the answer my friend, is blowing in the wind… 😉
    Found this : http://digitalize.ca/wordpress-plugins/co-authors-plus/comment-page-1/#comment-20176
    Works fine.

    Thanks a lot!

    Thread Starter jojaba

    (@jojaba)

    Should I use this function ?
    <?php register_post_type( $post_type, $args ) ?>
    Found on Function register post type in WordPress Codex – http://codex.wordpress.org/Function_Reference/register_post_type

Viewing 5 replies - 166 through 170 (of 170 total)