'post',
'orderby' => 'rand',
'posts_per_page' => 5,
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
$string .= '
';
while ( $the_query->have_posts() ) {
$the_query->the_post();
$string .= '- '. get_the_title() .'
';
}
$string .= '
';
/* Restore original Post Data */
wp_reset_postdata();
} else {
$string .= 'no posts found';
}
return $string;
}
function techdev_scripts() {
wp_enqueue_style( 'techdev-style', get_stylesheet_uri() );
wp_enqueue_style( 'techdev-bulma', get_template_directory_uri() . '/css/bulma.min.css' );
wp_enqueue_style( 'techdev-font1', "https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" );
wp_enqueue_style( 'techdev-font2', "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" );
wp_enqueue_script( 'techdev-jq', get_template_directory_uri() . '/js/jquery-3.4.1.min.js');
}
add_action( 'comment_form_before', 'techdev_enqueue_comments_reply' );
add_action( 'wp_enqueue_scripts', 'techdev_scripts' );
add_theme_support( 'title-tag' );
add_theme_support( 'automatic-feed-links' );