About the Download

Theme URL:

wp-content/themes/marketify-child/functions.php

 

Code:

For Display Meetup in Admin

add_action( ‘init’, ‘meetups_post_type’ );
function meetups_post_type() {
$labels = array(
‘name’ => ‘Meetups’,
‘singular_name’ => ‘Meetup’,
‘add_new’ => ‘Add New’,
‘add_new_item’ => ‘Add New Meetup’,
‘edit_item’ => ‘Edit Meetup’,
‘new_item’ => ‘New Meetup’,
‘view_item’ => ‘View Meetup’,
‘search_items’ => ‘Search Meetups’,
‘not_found’ => ‘No Meetups found’,
‘not_found_in_trash’ => ‘No Meetups in the trash’,
‘parent_item_colon’ => ”,
);

register_post_type( ‘meetups’, array(
‘labels’ => $labels,
‘public’ => true,
‘publicly_queryable’ => true,
‘show_ui’ => true,
‘exclude_from_search’ => true,
‘query_var’ => true,
‘rewrite’ => true,
‘capability_type’ => ‘post’,
‘has_archive’ => true,
‘hierarchical’ => false,
‘menu_position’ => 10,
‘supports’ => array( ‘title’, ‘editor’, ‘excerpt’, ‘author’, ‘thumbnail’, ‘comments’, ‘revisions’, ‘custom-fields’, ),
‘register_meta_box_cb’ => ‘meetups_meta_boxes’, // Callback function for custom metaboxes
) );

For Display in Front

wp-content/themes/marketify-child/page-templates/meetuprequest.php

 

<section id=”primary” class=”site-content”>

<div id=”content” role=”main”>
<div class=”container”><h3 class=”widget-title widget-title–home section-title”><span>Meetups</span></h3>
<?php
$args = array(
‘post_type’=>’meetups’,
‘post_status’ => array(‘publish’));
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
?><div class=”row”><?php
while ( $query->have_posts() ) {
$query->the_post();
$testimonial_data = get_post_meta( get_the_ID(), ‘_meetup’, true );
$client_name = ( empty( $testimonial_data[‘client_name’] ) ) ? ” : $testimonial_data[‘client_name’];
$source = ( empty( $testimonial_data[‘source’] ) ) ? ” : ‘ – ‘ . $testimonial_data[‘source’];
$link = ( empty( $testimonial_data[‘link’] ) ) ? ” : $testimonial_data[‘link’];
$cite = ( $link ) ? ‘<a href=”‘ . esc_url( $link ) . ‘” target=”_blank”>’ . $client_name . $source . ‘</a>’ : $client_name . $source;
?>
<div class=”col-md-3 col-sm-4 col-xs-12″>
<div class=”meetup-img”>
<img src=”<?php echo get_the_post_thumbnail_url(get_the_ID(),’full’);?>” alt=”<?php the_title();?>” class=”img-responsive”>
</div>
<h3 class=”entry-title entry-title2 entry-title–hentry”><a target=”_blank” href=”<?php echo esc_url( $link );?>” rel=”bookmark”><?php the_title();?></a></h3>
<!–<p class=”testimonial-client-name”><cite><?php echo $cite; ?></cite></p>–>
</div>

<?php
}
?></div>
<?php
}
?>

</div>

</div>

</section>

Types
Date Created 13/08/2019
Licence lt1222
Support Time(in Minutes) 660
Support Details