Popup image from text

If you are using bootstrap then you can try the code bellow: <button type=”button” class=”btn btn-primary” data-toggle=”modal” data-target=”#myModal”>Popup image</button> <div id=”myModal” class=”modal fade” tabindex=”-1″ role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true”> <div class=”modal-dialog”> <div class=”modal-content”> <div class=”modal-body”> <img src=”https://placehold.it/1000×600″ class=”img-responsive”> </div> </div> </div> </div>

How can I hide/show text only for mobile users?

I guess that you can set the class for the paragraph and set it’s display to none only on mobile view. Such as, @media screen and (max-width:479px){ .nameofclasswhichtheparagraphhas {display:none;} } And add a button below it but set it’s display to none for Laptop users. Such as, @media screen and (max-width:768px){ .theclassofthebuton {display:none;} } and … Read more

How to use limit post content on archive page in WordPress?

use wp_trim_words() like so: <?php $moreLink = ‘<a href=”‘ . get_the_permalink() . ‘”>Read More</a>’; echo ‘<div class=”advert-div”>’; ?> <h2 class=”ad-title”><?php the_title(); ?></h2> <?php echo wp_trim_words(do_shortcode(“[the_ad id=”.$post->ID.”]”), 55, $moreLink); echo ‘</div>’; Just substitute however you need to get the permalink for your add in to the $moreLink if needed.