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

How to implement CSS-defined images from bootstrap site in wordpress theme

Multiple solutions for defining the images -> Post Thumbnails While creating a new post, you can set the Featured Image which will automatically set the post image. Since your image is full width, you need to set the size of the thumbnail using: https://codex.wordpress.org/Function_Reference/the_post_thumbnail Media Upload Go to Media -> Add New. Upload your image … Read more

Is there a way to multiply archive loop results sequentially?

<?php $counter = 1; if(have_posts()) : while(have_posts()) : the_post(); ?> <?php if($counter == 1) : ?> <div class=”row clear” style=”margin-bottom:0px;”> <div class=”col-md-12 border-12″> <a class=”thumb” href=”https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”><?php the_post_thumbnail(‘category-thumbnail’); ?></a> <div class=”blog-details-wrapper clear”> <h2 class=”title”> <a href=”https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a> </h2> <span class=”date”><?php the_time(‘F j, Y’); ?> <?php … Read more

Get the featured image url of clicked post

It seems you are using this outside the loop then use get_the_post_thumbnail to get the featured image for any post by supplying post id. So your code will become this. <?php if ( has_post_thumbnail() ) { echo ‘<a href=”‘ . get_permalink( $post->ID ) . ‘” >’; echo get_the_post_thumbnail( $post->ID, ‘my_feature_image’, array( ‘class’ => “someName” ) … Read more

Shortcode arguments to another shortcode

You could pass the variable via a global but it would be neater to trap it in a static variable: function track_acc_id($new_id = false) { static $id; if (!empty($new_id)) { $id = $new_id; } return $id; } //This is the accordion container function accordionGroup( $atts, $content = null ) { extract(shortcode_atts(array( ‘id_container’ => ”, ), … Read more

WordPress keeps showing mobile version on Internet Explorer

When I had this issue it was because I was missing something from the <head>. Below is the head from the basic template on the bootstrap website. <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <!– The above 3 meta tags *must* come first in the head; any other head content must come … Read more

Bootstrap modal with jQuery post [closed]

If process.php is not found, your reference in the file is not correct. Make sure you reference to the correct path, for istance – if the file is in the rootdirectory of your site, add a slash in front of your code: url: “process.php”, will be: url: “/process.php”, If it is in the ‘ajax’ directory: … Read more

Full width featured thumbnail

The easiest way would be to do away with the content.php file for this template and move everything to your single-thumbnail-featured.php so you don’t mess up any other pages using content.php. Then I would simply move the_post_thumbnail() outside the col-md-8 into a full width col-md-12. single-thumbnail-featured.php //Loads the header in which there is a container … Read more