• Resolved fatty123

    (@fatty123)


    What does “->” in wordpress stand for, I often see this being used in the wordpress loop, if statements and other places

    I don’t see there is a documentation for this symbol in wordpress but is often used with other example….

    Following are few “->” I have encountered so far:
    /////////////////////////////////////

    example 1:
    
    $recentPosts = new WP_Query();
    $recentPosts -> query('showposts=5');

    //////////////////////////////////////

    example 2:
    
    while($selectedPosts -> have_posts()): $selectedPosts -> the_posts():
    is used instead of
    while(have_posts()): the_posts():

    //////////////////////////////////////

    example 3:
    
    if($post -> post_parent){
       //??
    }

    //////////////////////////////////////

    example 4:
    
    $image = get_post_meta($post -> ID,'header_image', true);

    //////////////////////////////////////

    Can anyone explain the meaning of this symbol?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress "->" ?’ is closed to new replies.