Slider won’t work with custom query

For this example I used a fake category called “Slider Category” you will need to create that or replace that section of the code. <? $query = new WP_Query( array( ‘category_name’ => ‘Slider Category’ ) ); ?> <div class=”wrapper”> <div class=”list_carousel responsive”> <ul id=”desliza”> <?php while ( $query->have_posts() ) : $query->the_post(); ?> <li> <div class=”feattitle”><a … Read more

Custom Post type content within a slider

Since WP loaded with jQuery by default, you might be able to modify this script http://www.jqueryscript.net/rotator/Simple-Text-Slider-Rotator-with-jQuery-CSS.html to create a testimonials sliders. For randomizing your query, just put ‘orderby’ => ‘rand’ in your $args variable like this: $args = array( ‘post_type’ => ‘testimonials’, ‘orderby’ => ‘rand’); There are way more arguments you can learn from here: … Read more

wordpress carousel slide not working

Use this below code. I have done this below code with some modification with Questioner’s code. Now it is working. <div id=”carousel” class=”carousel slide” data-ride=”carousel” data-interval=”3000″> <!– Carousel items –> <div class=”carousel-inner”> <?php $slider = new WP_Query(array( ‘post_type’ => ‘slide’, ‘posts_per_page’ => -1, )); ?> <?php if ( have_posts() ) { $x=0; while ( $slider->have_posts() … Read more

remove slider mobile not via css

This is one of those problems that seems like it should have a simple solution, but really doesn’t. There are options, they’re just not easy. At least, from what I can see. CSS is the best approach to detecting browser width IMO. In fact, you really can’t detect browser width from PHP. You can with … Read more

Can’t add text in front of shortcode

Here’s your updated shortcode function which puts output in a variable and returns it. Note that you have to use functions that return data rather than output directly, in this case get_the_post_thumbnail() is used in place of the_post_thumbnail() function cor_etalage_add_shortcode() { $output=”<div id=”etalage”><ul>”; $the_query = new WP_Query(array( ‘post_type’ => array( ‘portfolio’ ) )); while ($the_query->have_posts()) … Read more

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