How to dynamically attach pictures to a carousel

It’s an interesting task. We can make a custom Slider Menu in Dashboard then featured images can be upload from there so that those images can be called dynamically in slider. First we have to make Theme Support and register Post Type in functions.php add_theme_support( ‘post-thumbnails’, array( ‘post’, ‘slider’ ) ); add_image_size( ‘slider-image’, 1024, 550, … Read more

Modify this loop to fit my jQuery slider (slides)

Tried very simple math. <div class=”slide”> will print after every 4 post. So, if statement with old school logic $i%4 == 0 <div class=”slides_container”> <?php $args = array( ‘post_type’ => ‘fastighet’, ‘numberposts’ => -1, ‘orderby’ => ‘ASC’ ); $posts = get_posts($args); ?> <?php $i = 0; foreach($posts as $post): ?> <?php if($i%4 == 0): ?> … Read more

WordPress Featured Post Slider

This is one of those things you probably have to do yourself, even though there are some slider plugins, they are difficult to customize. Using a jquery slider is pretty straightforward, they are usually just controlled with ID’s and CLASS’s, so you can wrap any WordPress code, for instance a wp_query (for featured posts). toscho’s … Read more