Advertisement
alaminlink

WP Theme Development (Stylize Comments & Featured Image)

Sep 12th, 2014
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. Adding Comment CSS
  2.  
  3. Pastebin Link for CSS: http://pastebin.com/VaxfkmMe
  4.  
  5. functions.php
  6.  
  7. For enable comment
  8.  
  9. function comment_scripts(){
  10.  
  11.    if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
  12.  
  13. }
  14.  
  15. add_action( 'wp_enqueue_scripts', 'comment_scripts' );
  16.  
  17. For enable featured image
  18.  
  19. add_theme_support( 'post-thumbnails', array( 'post' ) );
  20.  
  21. for enable crop feature
  22.  
  23. set_post_thumbnail_size( 200, 200, true );
  24.  
  25. add_image_size( 'post-image', 150, 150, true );
  26.  
  27. post-loop.php
  28.  
  29. Using Featured Image
  30.  
  31. <?php the_post_thumbnail('post-image', array('class' => 'post-thumb')); ?>
  32.  
  33. Tutorial Link: http://rrfoundation.net/342
  34.  
  35. Source Theme Download Link: http://sdrv.ms/T4THqZ
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement