• Resolved tremlas

    (@tremlas)


    I’ve now done a static generation with 3.2.7 and I kept the suggested addition at the bottom of my theme’s functions.php. I still don’t get my website’s /feeds/index.html file included in my generated output. This is a normal wordpress page that happens to be titled ‘feeds’.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author patrickposner

    (@patrickposner)

    Hey @tremlas,

    this one works just fine for me:

    add_filter('ss_excluded_by_default', function( $excluded ) {
    unset( $excluded['feed'] );
    return $excluded;
    });

    Can you double-check it?

    Thread Starter tremlas

    (@tremlas)

    Hi @patrickposner, I tried with that filter but it didn’t make any difference. When I did some debugging I noticed that, on my system at least, the $excluded array is indexed by number so I tried with the following as the filter instead:

    add_filter('ss_excluded_by_default', function( $excluded ) { $newarr = array_diff($excluded, array('feed')); return $newarr;});

    This did the trick, my /feeds/index.html file is now present in the generated static zip file.

    Plugin Author patrickposner

    (@patrickposner)

    Interesting @tremlas,

    thanks for the update!

    I’ll probably start recommending this approach instead, as unset() can be disabled on the hosting (network) level for security reasons—especially in an OOP context—so creating a new array and merging it is the more fail-safe approach!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.