Different column width in 2 rows with bootstrap and custom post types-different classes needed

Try the code below. <div class=”container-fluid gray-section”> <div class=”container”> <div class=”row”> <?php $projects = get_posts(array(‘post_type’=>’project’,’posts_per_page’=>5, ‘order’=>’ASC’)); if ($projects) { ?> <ul class=”list-unstyled”> <?php $i = 0; ?> <?php foreach ($projects as $post) { setup_postdata( $post ) ?> <?php if($i % 3 == 1) { ?> <li class=”col-md-4 col-sm-6 col-xs-12 col-xxs-12 text-center “> <?php } else … Read more

Function Display article [closed]

If you only want The Content (of the main editor of the post) displayed, you can use echo get_the_content(the_ID). If you want more: First, you have to get the post data from the database, with the function get_post, or doing a query with WP_query. Then you can output different parts like title, date, content… accessing … Read more

Extract and display user infromation on an automatically created page

If I understand your question correctly, you should be able to grab the information you’re after from $the_user. If you use: $my_post[‘post_content’] = print_r($the_user,true); you should be able to see all the available user information in the page. Once you know exactly what you want, you can echo it out nicely with something like: $my_post[‘post_content’] … Read more

Applying CSS on PHP variable [closed]

do not use <font> html tag, it is old and i’m not even sure if can work in modern browsers. instead use <span> (for inline text) or <p> (for paragraph). php and html can work together but there’s an appropriate way to write it. generally speaking, html code is wrapped with double quotes “html” and … Read more