Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Could you post your site URL here, so I can have a look at what you’re trying to change? The snippet above will only work if you’re trying to change the “Older Posts” text when it’s added via Jetpack’s Infinite Scroll feature.

    Thanks!

    Thread Starter neobodhi

    (@neobodhi)

    Hi Jeremy,

    The site is https://jokes.fyi/

    Thanks!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Thank you! That “Older Posts” button is indeed generated by Infinite Scroll. The code you posted above will help you change that text. I just tested it again, and it works well.

    If the code breaks your site, try to insert only the following in a functionality plugin like this one:

    
    function jeherve_custom_infinite_more() {
    	if ( is_home() || is_archive() ) { ?>
    		<script type="text/javascript">
    			//<![CDATA[
    			infiniteScroll.settings.text = "Custom Text";
    			//]]>
    		</script>
    	<?php }
    }
    add_action( 'wp_footer', 'jeherve_custom_infinite_more', 3 );
    

    I hope this helps.

    Thread Starter neobodhi

    (@neobodhi)

    Thank your for the response!

    Would I insert that that code in a functionality plugin and then try ad the code from the link in my original post? Sorry, I am a little confused.

    • This reply was modified 7 years, 10 months ago by neobodhi.
    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Would I insert that that code in a functionality plugin

    You can use only the code I just posted above, in a functionality plugin. The code is the same as you linked to earlier, but without the opening <?php tag since you won’t need it in the functionality plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to you change the “older posts” text?’ is closed to new replies.