Viewing 3 replies - 1 through 3 (of 3 total)
  • I had the same issue with Collapsing Pages 1.01, it looks like the developer commented out the part of the code that excludes pages – there might be a good reason, but anyway in my case I was able to uncomment the code and get the exclusions to work again.

    diff collapsPageList.php collapsPageList.bak
    183c183,184
    <     $inExcludePageQuery ="AND post_name $in ($inExclusionsPage) AND ID $in ($inExclusionsPage)";
    ---
    >     //$inExcludePageQuery ="AND post_name $in ($inExclusionsPage)
    >     //AND ID $in ($inExclusionsPage)";

    It may also be necessary to update “Appearance : Widgets : Collapsing Pages” and use page IDs separated by commas instead of page titles.

    Thread Starter Zoe.Snyder

    (@zoesnyder)

    Hi Gerry,

    I am not a php expert, I did what you indicated and nothing changed, all my pages are appearing, and I am using page ID’s.

    This is such a useful plugin. I am using one called “Flexipage widget”, but it is not the same.

    Can you verify that this syntax is correct? I copied this straight from the collapsPageList.php file (lines 180-188):

    if ( empty($inExclusionsPage) ) {
    		$inExcludePageQuery = "AND post_name NOT IN ('')";
      } else {
        $inExcludePageQuery ="AND post_name $in ($inExclusionsPage)
        AND ID $in ($inExclusionsPage)";
      }
    	if ( !empty($exclusions) ) {
    		$exclusions .= ')';
      }

    When you say “t may also be necessary to update “Appearance : Widgets : Collapsing Pages” ” do you mean download a fresh copy? ..There Is no update to be done.
    Thank you.

    The code change you made looks correct (in my example above the code is on one line, but this should not matter). Check the PHP file you changed is the one being used by the active plugin. Check the page exclusion IDs are correct, check browser cache is clear, check the plugin is active by changing settings and seeing the site change.

    You can also activate debug mode by going to “Appearance : Widgets : Collapsing Pages : Advanced Options : Show Debugging…”, then reload the page, view source, then scroll down until you see these two important headings

    collapsPage options:
    PAGE QUERY:

    you should be able to see where it is going wrong, or post the output of those two headings here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘NEW Thread about Excluding Pages’ is closed to new replies.