Populate a slideshow list of images from images in a wordpress page?

Most of this is part of the Codex: <?php $attachments = get_posts(array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ =>’any’, // This is where you specify the ID of your private image page ‘post_parent’ => $private_page_id, )); if (count($attachments)) { // We have attachments ?> <ul id=”flexiselDemo3″> <?php // Now we loop through them foreach … Read more

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

Using an Image Slider twice on the same page

My approach (take it as such) would be simply generating a unique ID which will differentiate each slider. That’s anyway a good practice when the same functionality can potentially be displayed multiple times on the same page. First, find a way to generate an incremental $id to use in your template. Maybe an instanciation ID… … Read more

How can I display most commented or viewed post as slide

To display “most viewed” you would need to keep a view count (which WordPress does not do by default). They do, however, keep comment counts. WP Beginner has articles for each of these circumstances: “How to Display Popular Posts by Views in WordPress without a Plugin” “How to Display Most Commented Posts in WordPress Without … 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

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