WordPress Loop with Custom Post Type for Bootstrap Accordion [closed]

You put the accordion inside the loop, that’s why it is not working as you want. Try this: <?php $args = array( ‘post_type’ => ‘review’ ); $the_query = new WP_Query($args); ?> <div class=”row mb-5″> <div class=”col-md-9″> <div id=”accordion” role=”tablist” aria-multiselectable=”true”> <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : ?> <?php $the_query->the_post(); ?> … Read more

Use bootstrap for wordpress gallery? [closed]

The gallery shortcode is contained in the wp-includes/media.php file. There is a function gallery_shortcode( that does all work. About 25 lines down you find: $output = apply_filters( ‘post_gallery’, ”, $attr, $instance ); if ( $output != ” ) { return $output; } This code goes out and runs any filters tethered to post_gallery, and if … Read more

Parent style messing up with Bootstrap [closed]

input[type=”text”] is more specific than class selector .form-control so the bootstrap.min.css is not overwriting the css in style.css although the bootstrap.min is loaded after style.css. You have to add css with more or same specificity to overwrite. For selector input[type=”text”] you can add the properties of .form-control class in style.css

Twentyseventeen theme and Bootstrap are seemingly incompatible [closed]

Bootstrap classes are not the same classes in WordPress, you need to write Bootstrap HTML markup into your theme file and then it will work. Here look at the examples given and mix the Bootstrap HTML with WordPress template tags and PHP. Start with this basic template and replace the parts that you want WordPress … Read more

What are the downsides of using bootstrap in plugin development?

Yes, there are clearly challenges to using such a public dependency as Bootstrap, especially in a public plugin: version conflicts; styling conflicts; script conflicts. To minimize possibility of conflict and breakage you would need to consider following extra steps: Importing just the necessary Bootstrap styles into your stylesheet and making them specific to only markup … Read more

Carousel slider with WP_Query to show 3 posts on each slide

Despite your question is a generic PHP programming problem, what you’re trying to do can be achieved like so, where the key is the $i which is a custom while counter: <div class=”carousel-inner” role=”listbox”> <?php if ( $popular_services->have_posts() ) : $i = 0; // add this counter while ( $popular_services->have_posts() ) : $popular_services->the_post(); ?> <?php … Read more

How to display a list of authors in bootstrap grid?

Not many ways to style the wp_list_author but you can use the style => ‘list’ argument to display authors in <li> and then style your <ul>as wanted. https://developer.wordpress.org/reference/functions/wp_list_authors/ <div class=”container”> <div class=”row”> <div class=”col-lg-4″> <ul class=”d-flex”> <?php wp_list_authors( array( ‘exclude’ => 4, ‘show_fullname’ => 1, ‘optioncount’ => 1, ‘orderby’ => ‘post_count’, ‘order’ => ‘DESC’, ‘number’ … Read more

Convert theme to be based on Bootstrap?

I have created at least two wordpress themes using Bootstrap 3. In fact, is not complicated at all. Besides the obvious, you need keep in mind three things to do: Enqueuing correctly both the bootstrap styles and scripts Set up an own “Walker Nav Menu” that override the default walker for create drop-down menus Change … Read more