Title: simalamdeveloper's Replies | WordPress.org

---

# simalamdeveloper

  [  ](https://wordpress.org/support/users/simalamdeveloper/)

 *   [Profile](https://wordpress.org/support/users/simalamdeveloper/)
 *   [Topics Started](https://wordpress.org/support/users/simalamdeveloper/topics/)
 *   [Replies Created](https://wordpress.org/support/users/simalamdeveloper/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/simalamdeveloper/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/simalamdeveloper/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/simalamdeveloper/engagements/)
 *   [Favorites](https://wordpress.org/support/users/simalamdeveloper/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [not displaying posts](https://wordpress.org/support/topic/not-displaying-posts/)
 *  [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/not-displaying-posts/#post-3342332)
 * Your certainly can. I didn’t include all the available args in the example. You
   cans see them in the codex
    [http://codex.wordpress.org/Template_Tags/get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
 * Category needs to be the ID, not the name so you could do something like this:
 *     ```
       <?php $args = array(
           'numberposts'     => 5,
           'offset'          => 0,
           'category'        => get_cat_ID( 'news' ),
           'orderby'         => 'post_date',
           'order'           => 'DESC',
           'post_type'       => 'post',
           'post_status'     => 'publish',
           'suppress_filters' => true ); ?>
       ```
   
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [CSS….CSS3 and Word Press ?](https://wordpress.org/support/topic/csscss3-and-word-press/)
 *  [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/csscss3-and-word-press/#post-3341898)
 * Sorry I should have been more specific. Place the css part in the style.css of
   your the current active theme
 *     ```
       .content{
           height:300px;
           width:300px;
           background-color:red;
   
           -webkit-border-radius: 3px;
           -moz-border-radius: 3px;
           border-radius: 3px;
       }
       ```
   
 * And the html in one of the templates you are viewing
 *     ```
       <div class="content">
         <p>Look mom, I am rounded!</p>
       </div>
       ```
   
 * Test to see if you get a red box on the page. If not try a differn’t class name.
   Your styles “.content” could be getting overwritten by another style in the CSS
   file.
 * Once you get a red box with rounded corners working, try a different element 
   in your theme and find out what class or id it’s using and try giving it rounded
   corners.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [not displaying posts](https://wordpress.org/support/topic/not-displaying-posts/)
 *  [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/not-displaying-posts/#post-3342288)
 * Hello stiwdio,
 * Before that code you would have to tell wordpress which posts you would like 
   to display.
 * WordPress has some default code that gets posts based on the which page it is
   displaying that is not in the template files. When you are on the homepage it
   gets the newest posts. When you are viewing a page, it gets the “Page” you requested
   by the URL.
 * The first line in that piece of code is saying “If I have posts display them 
   with this code. And the ELSE at the end is saying If I don’t have posts do nothing”
 * I would recommend using the get_posts() function to get the posts you want to
   display in your template
    [http://codex.wordpress.org/Template_Tags/get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
 * You would have to change the have_posts() in the first line to reflect the variable
   that will contain your posts
 * To get the 5 newest posts:
 *     ```
       <?php $args = array(
           'numberposts'     => 5,
           'offset'          => 0,
           'orderby'         => 'post_date',
           'order'           => 'DESC',
           'post_type'       => 'post',
           'post_status'     => 'publish',
           'suppress_filters' => true ); ?>
   
       <?php $posts_array = get_posts( $args ); ?>
       <?php if ($posts_array) : ?>
       <div id="post-area">
       <?php foreach ($posts_array as $post) :  setup_postdata($post); ?>	
   
          		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       		 <?php if ( has_post_thumbnail() ) { ?>
   
              <div class="imagewrap">
                <div class="gridly-image"><a>"><?php the_post_thumbnail( 'summary-image' );  ?></a></div>
                <div class="gridly-category"><p><?php the_category(', ') ?></p></div> </div>
       		  <?php } ?>
              			<div class="gridly-copy"><h3><a>"><?php the_title(); ?></a></h3>
   
       <?php the_excerpt(); ?> 
   
                      <p class="gridly-link"><a>">read more →</a></p>
                </div>
              </div>
   
       <?php endforeach; ?>
       </div>
       <?php else : ?>
       <?php endif; ?>
   
       <?php next_posts_link('<p class="view-older">View Older Entries</p>') ?>
       ```
   
 * I have changed the while loop to a foreach loop.
 * <?php $posts_array = get_posts( $args ); ?> tells wordpress to get all posts 
   that match the criteria inside the $args array. If posts are found they are returned
   and put into the $posts_array variable.
 * <?php if ($posts_array) : ?> checks to see if anything was returned from the 
   get_posts function
 * <?php foreach ($posts_array as $post) : setup_postdata($post); ?>
    Loops through
   each post in the $posts_array and sets up the post data so you can use the WordPress
   functions to display the post
 * Hope this helps!
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [CSS….CSS3 and Word Press ?](https://wordpress.org/support/topic/csscss3-and-word-press/)
 *  [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/csscss3-and-word-press/#post-3341876)
 * Hello tcw7
 * CSS3 just adds a bunch of additional styling features to CSS, It is written the
   same as the older version of CSS
 * Some CSS3 Features do not work in all browsers. Rounded corners do not work in
   Internet explorer less than version 9
 * Here site I like to use for getting rounded corner code.
    [http://border-radius.com/](http://border-radius.com/)
 * For an example of a simple rounded corner div
 *     ```
       <div class="content">
         <p>Look mom, I am rounded!</p>
       </div>
   
       .content{
           height:300px;
           width:300px;
           background-color:red;
   
           -webkit-border-radius: 3px;
           -moz-border-radius: 3px;
           border-radius: 3px;
       }
       ```
   
 * Make sure you are targeting the correct element you want to have the rounded 
   corners with the correct class or id.
 * Hope this helps!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[ImageFX] Multiple of one size](https://wordpress.org/support/topic/multiple-of-one-size/)
 *  [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-of-one-size/#post-3264455)
 * Hello,
 * I am having the same issue. I am using wordpress 3.5. The image is being outputted
   for some images but not all.
 * I have two images defined at the same size:
    add_image_size(‘front-thumb’, 231,
   158, true); add_image_size(‘front-thumb-black’, 231, 158, true);
 * In the plugin settings I have font-thumb-black set to a slug of bw
 * I checked the upload folder and both images with the correct size are there, 
   one with the slug -bw appendeded to it with the correct color filtering.
 * When I write out both images to the page using wp_get_attachment_image:
    $output.
   = wp_get_attachment_image( $attachments[ $id ]->ID, ‘front-thumb’, 0, array( ‘
   class’ => ‘normal’, ‘data-id’ => $attachments[ $id ]->ID));
 * $output .= wp_get_attachment_image( $attachments[ $id ]->ID, ‘front-thumb-black’,
   0, array( ‘class’ => ‘bw’, ‘data-id’ => $attachments[ $id ]->ID));
 * I am looping through images in a gallery and displaying these two images a few
   images have the correct URL with -bw appended, but the majority of them have 
   the same url.
 * Thanks!
 * **Update
    After further investigation the only JPEG images are being converted
   to black and white. PNG images are being ignored
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Photo] [Plugin: User Photo] How to RETURN photo instead of ECHO photo?](https://wordpress.org/support/topic/plugin-user-photo-how-to-return-photo-instead-of-echo-photo/)
 *  [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-how-to-return-photo-instead-of-echo-photo/#post-2939608)
 * Didn’t know about the content_url function! Took a quick look but didn’t see 
   anything. I’ll keep it in mind for future use.
 * Thanks! 😀
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Photo] [Plugin: User Photo] How to RETURN photo instead of ECHO photo?](https://wordpress.org/support/topic/plugin-user-photo-how-to-return-photo-instead-of-echo-photo/)
 *  [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-user-photo-how-to-return-photo-instead-of-echo-photo/#post-2939606)
 * This worked for me:
 * For Thumbnail:
    $photoUrl = get_bloginfo(‘wpurl’) . ‘/wp-content/uploads/userphoto/’.
   get_user_meta($userID, ‘userphoto_thumb_file’, true);
 * For Full Image:
    $photoUrl = get_bloginfo(‘wpurl’) . ‘/wp-content/uploads/userphoto/’.
   get_user_meta($userID, ‘userphoto_image_file’, true);
 * This will just get the full URL to the image.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Custom login page redirects to standard login page on incorrect password](https://wordpress.org/support/topic/custom-login-page-redirects-to-standard-login-page-on-incorrect-password/)
 *  Thread Starter [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/custom-login-page-redirects-to-standard-login-page-on-incorrect-password/#post-2837793)
 * Thanks PolshikovRM
 * Based on your suggestion I was able to find something that worked for me! I had
   to edit it a little because it appended the failed login variable each time they
   attempted to login.
 *     ```
       add_action( 'wp_login_failed', 'my_front_end_login_fail' );  // hook failed login
   
       function my_front_end_login_fail( $username ) {
          $referrer = $_SERVER['HTTP_REFERER'];  // where did the post submission come from?
          // if there's a valid referrer, and it's not the default log-in screen
          if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') ) {
   
       	  $pos = strpos($referrer, '?login=failed');
   
       		if($pos === false) {
       		 	// add the failed
       		 	wp_redirect( $referrer . '?login=failed' );  // let's append some information (login=failed) to the URL for the theme to use
       		}
       		else {
       			// already has the failed don't appened it again
       			wp_redirect( $referrer );  // already appeneded redirect back
       		}	
   
             exit;
          }
       }
       ```
   
 * Original Was found on:
    [http://wordpress.stackexchange.com/questions/15633/how-can-i-redirect-user-after-entering-wrong-passowrd](http://wordpress.stackexchange.com/questions/15633/how-can-i-redirect-user-after-entering-wrong-passowrd)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP eCommerce] [Plugin: WP e-Commerce] wpsc_payment_successful hook not working with paypal pro](https://wordpress.org/support/topic/plugin-wp-e-commerce-wpsc_payment_successful-hook-not-working-with-paypal-pro/)
 *  Thread Starter [simalamdeveloper](https://wordpress.org/support/users/simalamdeveloper/)
 * (@simalamdeveloper)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wp-e-commerce-wpsc_payment_successful-hook-not-working-with-paypal-pro/#post-2779014)
 * Purchase status was set to 3
 * ‘wpsc_confirm_checkout’ Was being executed twice during check out, and as many
   times as you refreshed the final transaction summary page.
 * I had to create a custom action immediately after the transaction status was 
   set to 3 in the paypal-pro.merchant class

Viewing 9 replies - 1 through 9 (of 9 total)