Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • I also have ismyblogworking.com telling me that my site is not enabled for Gzip compression, even though I have WP Super Cache operating in Full mode. I found this site that tells how to turn gzipping on (it’s a very simple solution):
    http://wpbloghost.com/blog/gzip-compression/

    He recommends that you check your site at http://www.port80software.com/support/p80tools.asp

    When I run my site – without any change – on port80software, it tells me that gzip compression is working, in direct contradiction of ismyblogworking.com.

    It occurs to me that ismyblogworking is checking the wrong thing when a blog is using WP Super Cache. Donncha says above that his plugin uses its own gzipping, which perhaps turns off the standard WP or PHP gzipping process. It is possible that, when you “fix” this problem identified by ismyblogworking, you are actually duplicating Donncha’s process.

    Any thoughts?

    Steve

    Thread Starter stvbaker

    (@stvbaker)

    SORRY!! Please ignore the above post. It got posted without my thinking it was posted. Again, I’m sorry. This is the post I wanted to have appear in the thread.

    Syncbox, your information put me on the right track. I finally figured out how to write a function to get the number I need. Here is the code I came up with. Note that I use “seb” to mark any function or variable that is mine. Also, a blog page, or an archive or category page, etc. will return the value of zero, because they fail the Pages test.

    function seb_get_menu_order_num( $seb_post_id) {
    $seb_menu_order_num = 0;
    $seb_post_id = (int) $seb_post_id;
    if ( false == is_page($seb_post_id))
    	return $seb_menu_order_num;
    
    $post = get_post( $seb_post_id );
    $field = 'menu_order';
    $seb_menu_order_num = (int) $post->$field;
    return $seb_menu_order_num;
    }

    I’m thinking of making $seb_menu_order_num a global variable. If I can do that, then I can call this function before the header, to set the number into the variable, and then I can use the variable in other locations down the post without having to call the function again (and again).

    Please let me know if you (1) see any way to make this code leaner, or (2) have a different way to do this that is more efficient.

    Thanks!

    Steve

    Thread Starter stvbaker

    (@stvbaker)

    Syncbox, thank you very much for your posts. Lots of information to check. Unfortunately, this doesn’t help. It appears to be a huge chore to you, but I know how to use a few If statements to do it easily. If I have 6 sections on my website, all I need are 6 If statements. That’s easy, not a huge chore. The problem is the variables or functions I need to use to do this. I can’t figure out what they are called or even if they exist.

    I cannot use the ID# in a simple manner. ID#s are assigned arbitrarily to each post/page as I first create it. So trying to determine whether a page is in section A or section B requires me to list every single ID# one by one in the If statement for that section. Same problem with post_name or post_title. However, the Page Order Number that I set in my Dashboard would be perfect. Unfortunately, I can’t find any information anywhere that says how to access the Page Order Number in a PHP function when WordPress creates the page. If I knew that variable name, I wouldn’t need to use “ID#,ID#,ID#…”. I could use If(“$page_order_number” >1999 && “$page_order_number” <3000) then… Simple. But I can’t find anywhere that talks of a $page_order_number variable. Do you know if this exists somewhere, and if so, what it is actually called?

    Likewise, I cannot use the post_parent variable to screen, because that only goes up one level. Determining the subpage parent of a subsubpage cannot tell me if the subsubpage is in section A or section B. For that, I need to be able to use the is_tree() function and replace the post_parent variable with a variable named something like “ultimate_post_ancestor”. Do you know if such a variable exists, and if so, what it is called?

    Finally, I cannot use is_category() because Pages are not categorized. The only variables I know for Pages are the page’s ID#, page title, and page name. What I need is either one of (1) $page_order_number or (2) $ultimate_post_ancestor or their equivalents.

    Do you have any suggestions? I will be very appreciative of any ideas posted here, and I thank you for your time.

    Steve

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