thinkingman
Forum Replies Created
-
Ah! @jeremy Herve – you were right – it IS a duplicate declaration – but because my theme is a child theme of 2011, JetPack already has a function built-in that adds infinite-scroll support. You have to remove_action before defining your own. Not sure why I overlooked this, maybe it’s missing from the online documentation? Before your own
add_action
, if your theme is derived from one which JetPack has built-in support for, you have to insert the equivalent of this:remove_action( 'init', 'twenty_eleven_infinite_scroll_init' );
…in order to use infinite-scroll properly! Just FYI for those who are still scratching their heads over this problem…
I even added:
add_filter( 'infinite_scroll_js_settings','kupuae5_enforce_infinite_scroll_init'); function kupuae5_enforce_infinite_scroll_init($args) { $args['footer'] = false; $args['wrapper'] = false; return $args; }
…and the JavaScript output looks like:
var infiniteScroll = {"settings":{"id":"content","ajaxurl":"http:\/\/thinkingman.dynalias.com\/news\/?infinity=scrolling","type":"scroll","wrapper":false,"wrapper_class":"infinite-wrap","footer":false,"text":"Load more posts","totop":"Scroll back to top","order":"DESC","scripts":[],"styles":[],"google_analytics":false,"offset":0,"history":{"host":"thinkingman.dynalias.com","path":"\/news\/page\/%d\/","use_trailing_slashes":true},"stats":"blog=42360431&host=thinkingman.dynalias.com&v=ext&j=1:2.1.2&x_pagetype=infinite-jetpack"}};
…and in the generated source, you will still find the wrapper!!! ??
...<div class="infinite-wrap infinite-view-1" id="infinite-view-1" data-page-num="1"> <article id="post-1358" class="post-1358 post type-post status-publish format-standard hentry category-videos"> <header class="entry-header">...
no – no duplicates.
That doesn’t make any sense! I do see that the parameter in JavaScript is set to
true
, however in my code it is set tofalse
. Here is my code:function kupuae5_infinite_scroll_init() { add_theme_support( 'infinite-scroll', array( 'type' => 'scroll', 'container' => 'content', 'footer_widgets' => false, 'footer' => false, 'wrapper' => false, 'render' => false, ) ); } add_action( 'init', 'kupuae5_infinite_scroll_init' );
…notice that my setting for
footer
is also being ignored…Sure, this site is here. Pay no attention to the rest of the site, it is heavily under construction!
Still happening for me – setting wrapper to false still leaves it appending /page/x to the blog.
I was pretty shocked to figure this out as well—it is free, however.
Forum: Plugins
In reply to: [WP Super Cache] Different Web Browsers Served Different Cache Copies?Actually, many plugins I’ve come across have a poor code practice of generating different HTML depending on the User Agent string (this was pretty common [even for me] back in the days before you could rely on CSS for most degradation issues). Thus, the tendency will be for different cache files to be created for different browsers–always–unless you hack your wp-config to change the UA, which is a very disrecommended course of action…
Forum: Plugins
In reply to: [Slideshow Gallery] [Plugin: Slideshow Gallery] bug with tiny MCEI did the same—and donated to the author—I find that actually giving developers money motivates them to help you out more often ?? but also, the Pro version (whether the unpaid or the paid) seems to fix the issue.