WordPress.org

Ready to get started?Download WordPress

Forums

what_to_show override (6 posts)

  1. Nick Momrik
    Member
    Posted 10 years ago #

    Is there a reason you cannot override this?
    I request that it be:
    if (!isset($what_to_show))
    $what_to_show = get_settings('what_to_show');
    in wp-blog-header.php so that somone has the flexibility of overriding it. It's possible to override posts_per_page, so why not what_to_show?

  2. Nick Momrik
    Member
    Posted 10 years ago #

    bump...

  3. Chris
    Member
    Posted 10 years ago #

    I know this thread is old but I was wondering the same thing..
    So I looked at the wp-blog-header.php and saw after all the what_to_show things double equal signs "==". So being curious I removed them, just the double == and made them only =. Now it seems to work fine. I have one page showing only 3 cats and the last 3 posts. My index.php shows one day's posts.
    Is this alright? Is something broken or are the == typos?

  4. Nick Momrik
    Member
    Posted 10 years ago #

    I wanted to revisit this topic since I never received an answer before...but I'll respond to chris's post first.
    double == checks for equality in PHP, and a single sets something equal to something else.
    Developers...why not put
    'if (!isset($what_to_show))
    $what_to_show = get_settings('what_to_show');'
    in wp-blog-header.php?
    Why allow someone to override posts_per_page but not what_to_show? It definitely doesn't hurt anything to have it in there.

  5. Nick Momrik
    Member
    Posted 10 years ago #

    *bump*

  6. Nick Momrik
    Member
    Posted 10 years ago #

    SWEET!! :-) Thanks Ryan!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.