Bootstrap carousel – Using shortcode inside enclosing shortcode

Here is my solution: function getProductCarousel($atts) { $productIds = explode(‘,’,$atts[‘product_ids’]); ?> <div class=”col-center m-auto”> <div id=”myCarousel” class=”carousel slide” data-ride=”carousel” data-interval=”0″> <!– Carousel indicators –> <ol class=”carousel-indicators”> <?php $slide = 0; ?> <?php foreach($productIds as $index => $productId) { ?> <?php if ($index % 3 == 0) { ?> <li data-target=”#myCarousel” data-slide-to=”<?= $slide++; ?>” <?= $index … Read more

creating different style CTA button in the menu

why don’t you add a class that is the permalink for example? ie $output .= “<li class=”nav-item $active_class $dropdown_class ” . implode(” “, $item->classes) . “”>”; (this line is strange first because it’s going to output “nav item $active_class $dropdown_class”…is that what you want?) but all the same it COULD be $output .= “<li class=”nav-item … Read more

PHP code printed into CSS classes

Well, previous developer was a little bit naughty (;)) and used PHP short tags, which is a bad practice… And even worse – he used them a little bit wrong, I guess… As you can see, there is something like this in your code: style=”<?print implode(‘;’,$styles); ?>”> Of course there is no such thing like … Read more

How to change navwalker’s dropdown mark-up?

STEP 1 add a script to header like below ( it’s always better go for the enqueue method . i need some one to help me with properly adding the below script in WordPress way .jquery should run before the second script> <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js” type=”text/javascript”></script> <script> $(document).ready(function () { $(‘.dropdown-menu a.dropdown-toggle’).on(‘click’, function(e) { if (!$(this).next().hasClass(‘show’)) … Read more

Displaying Post Content on tooltip

The problem is that your template doesn’t have any quotes around the title attribute at all: title=<?php echo get_the_content(‘post_content’, $post->ID); ?> So the browser’s making its best guess and using the first word. So you need to add the quotes: title=”<?php echo get_the_content(‘post_content’, $post->ID); ?>” Also, if you’re outputting arbitrary content into an attribute you … Read more

Bootstrap News: Image Modifciation

You would have to add the category via PHP on top of the image. First find the PHP template(s) where your page is rendered. This could be archive.php for the overview. For single posts this is usually single.php, or content-single-post.php. It depends on your theme. Then you find where the post thumbnail is being rendered, … Read more

How to neutralize a parent theme php template?

I’m assuming that with ‘neutralize’ you mean de-register or remove, such that WC doesn’t see (or recognize) the file and functions as it would have without the woocommerce.php-file being there. This answer proposes a code in which your child theme (by code) physically deletes the parent theme file. There’s also a questions here that seems … Read more

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