WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Option Data in wp_options table (7 posts)

  1. frankindelicato
    Member
    Posted 4 years ago #

    Hi,

    I have been having issues with is_home(). Seems to be a common topic. Looking at the source code led me to the field "is_home" and after searching the Sql database found the field. It is option_id 334 in the wp_options table with the option_name lightbox_conditionals. The data option_value is a record defined as follows:

    a:8:{s:7:"is_home";b:1;s:9:"is_single";b:1;s:7:"is_page";b:1;s:11:"is_category";b:1;s:6:"is_tag";b:1;s:7:"is_date";b:1;s:9:"is_search";b:1;s:12:"is_automatic";b:0;}

    It seems this record defines is_home, is_single, is_page, etcetera. My question:
    Can anyone explain this records definitions, i.e., "a:8{s:7:" for the is_home field?

    Thanks

  2. MichaelH
    Member
    Posted 4 years ago #

    Those would be specific to a plugin. Can you provide a URL to the plugin and I'll tag this thread so the plugin author might see it.

  3. frankindelicato
    Member
    Posted 4 years ago #

    Ah!! I was thinking this was the "is_home" field used by the is_home() function in query.php which has: "return $wp_query->is_home;" in its source. But you are saying this is leftover data from a plugin I tested a couple of weeks ago. That plugin was
    from URL: http://leandrovieira.com/projects/jquery/lightbox/
    I guess I will have to continue searching for the WordPress field "is_home" used above by the is_home() function. Can you tell me where it is defined?

    Thanks

  4. MichaelH
    Member
    Posted 4 years ago #

    Well it is in query.php.

    Related:
    Conditional Tags

    You might want to describe the problems you are having and maybe someone can suggest a solutions.

  5. frankindelicato
    Member
    Posted 4 years ago #

    Yes, I understand is_home better now. I just finished reading:

    http://codex.wordpress.org/Function_Reference/WP_Query

    I am still new with WordPress and am excited by it. A very nice system. Anyway, my original problem was to just show the current posts from category 1 on the home page. Originally, I found that it was displaying a mixture of pages from the two categories I have. I read the forum and found I could use the following:

    <?php if (is_front_page()) { query_posts("cat=1"); } ?>

    Just before the loop in the themes (whitehouse) _posts.php page. This worked great but then I realized that my "sticky" page did not show up at the beginning of the posts. So, I have been researching that and leaning how this system is put together.
    I still have the sticky problem, if anyone knows a good way to fix it...

    Thanks

  6. MichaelH
    Member
    Posted 4 years ago #

    You'd would need another query post loop with a query such as:
    query_posts(array('post__in'=>get_option('sticky_posts')));

  7. frankindelicato
    Member
    Posted 4 years ago #

    Thank you MichaelH. I have seen that solution posted in the forum and it seems there are just general problems with sticky. I posted a possible solution "Possible Fix for Sticky Problems in function &get_posts() " in this forum a little while ago, but after writing "the solution" I found that I then had new sticky issues, which I have since solved (hopefully). I guess we should close out this thread. I will mark it resolved. I am going to update my "possible fix" thread with the new information I have discovered.

    Thanks again,
    Frank

Topic Closed

This topic has been closed to new replies.

About this Topic