Hierarchical gallery

WordPress Posts (First level) Yes, the posts feature can be used as a gallery. WordPress provides nice short code to show all the attached images in post. While adding galleries make sure they point to attachment page not to the real file. When user clicks on any of image from the gallery they’ll get to … Read more

create gallery page for specific post id

If you want to get all images attached to a single post then you can use this if ( $images = get_posts(array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_mime_type’ => ‘image’,))) { foreach( $images as $image ) { $attachmenturl=wp_get_attachment_url($image->ID); $attachmentimage=wp_get_attachment_image_src( $image->ID, full ); $imageDescription = apply_filters( ‘the_description’ , $image->post_content ); $imageTitle = … Read more

Create a live demo gallery for themes

Solution I used the wordpress-theme-showcaseplugin to show a list of themes in the home page, and to can easily browse the theme that is currently preview I changed the way wordpress handle the permalinks. In the wp-includes/link-template.php file in get_permalink function added this code if(isset($_GET[‘preview_theme’])){ $permalink = home_url(‘?preview_theme=”.$_GET[“preview_theme’] .’&p=’ . $post->ID); }else{ $permalink = home_url(‘?p=’ … Read more

ID of images from gallery

You can find out the IDs of which images are included in a gallery by switching to the Text editor tab and look for a piece of code like this: The comma-separated list of image IDs are enclosed in the ids attribute If you’re looking to find out IDs of existing images in order to … Read more

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