body_class(); not working with bootstrap navbar fixed top?

Why not use a navwalker to create your bootstrap menu? Try https://github.com/wp-bootstrap/wp-bootstrap-navwalker You can get the fixed-top to add to the menu <nav class=”navbar navbar-default navbar-fixed-top” temscope=”itemscope” itemtype=”http://schema.org/SiteNavigationElement” role=”navigation”> <div class=”container”> <div class=”navbar-header”> <button type=”button” class=”navbar-toggle” data-toggle=”collapse” data-target=”#navbar”> <span class=”sr-only”>Toggle navigation</span> <span class=”icon-bar”></span> <span class=”icon-bar”></span> <span class=”icon-bar”></span> </button> </div> <div class=”collapse navbar-collapse” id=”navbar”> <ul class=”nav … Read more

All of my custom Bootstrap styles are not working in my child theme!

In your child theme’s function.php file, find the enqueue function and add it there instead of using @import in your CSS. For example: function my_scripts_and_styles() { wp_enqueue_style( ‘main-style’, get_stylesheet_uri() ); wp_enqueue_style( ‘bootstrap-style’, get_template_directory_uri() . ‘/css/bootstrap.min.css’, array( ‘main-style’, ”, true ); if ( is_singular() && comments_open() && get_option( ‘thread_comments’ ) ) { wp_enqueue_script( ‘comment-reply’ ); } … Read more

Handling repeater data

Try: $fields = get_field(“updates_list”). And then print_r to see what’s inside. You should have a nice looking array with all repeater fields and values inside. Then, stop using have_rows and get_row and just loop using a foreach loop. get_field() is usually used to retrieve a unique field, but because it’s a repeater field you get … Read more

Bootstrap Carousel HTML structure and funny output [closed]

You have a nested anchor tag. I have never seen that done before. You are wrote this with your code <a href=”#”><a href=”#”></a></div></div></a> I would think that is your problem. Why do you need this first anchor tag? ?php while ($postsSlider->have_posts()) : $postsSlider->the_post(); if ($first) { ?> <a class=”foto_link” href=”https://wordpress.stackexchange.com/questions/290742/<?php the_permalink(); ?>”>//should this be here … Read more

Continue or break the while loop

‘break’ is the right keyword… code structure below, no custom query needed if used in a standard template. <?php $posts_per_first_section = 6; //how many posts you want to show in the first section// if ( have_posts() ) : ?> <!– opening html for first loop –> <?php /* Start the Loop */ while ( have_posts() … Read more

hide attached images of a post

My first recommendation would be to use Advanced Custom Fields to setup a gallery rather than using this method. However, I think you may be able to load your images using Add Media -> Create Gallery which will add a shortcode to your post content You could then use the_content filter and strip_shortcodes to remove … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)