Tags » Wordpress 2

Get all image attachment from post wordpress with a variety of sizes

Kita dapat mengambil semua image yang ada pada post yang telah kita publish dengan berbagai macam ukuran dengan cara :

$images =& get_children( array (
     'post_parent' => $post->ID,
     'post_type' => 'attachment',
     'post_mime_type' => 'image'
));
if ( !empty($images) ) :
   foreach ( $images as $attachment_id => $attachment ) :
      $image_gallery_thumb = wp_get_attachment_image_src( $attachment_id, 'img-thumbnail', false );
      $image_gallery_full = wp_get_attachment_image_src( $attachment_id, 'big-thumbnail', false );
?>
      <div class="gallery-single-item">
         <a href="<?php echo $image_gallery_full[0]; ?>" class="gallery-images">
           <img src="<?php echo $image_gallery_thumb[0]; ?>">
         </a>
      </div>
<?php
   endforeach;
endif;
… 28 more words
PHP

Its out. I’m over the moon.

Status

Export the database table as CSV format using PHP


This code need some files those files are,
1.db.php
2.export.php
3.index.php
as in the db.php file, make this.

database name –> wallstreet
table name–> export_table… 231 more words

Magento

Add a Favicon icon to your WordPress site

Add following code into your theme’s header.php.

<link rel="icon" href="http://www.example.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.example.com/favicon.ico" type="image/x-icon" />
WordPress