• My site contents single post has multi pages,I am using this code to split article in to multi pages “<!–nextpage–>”

    I need a filter script

    when a traffic coming through specific source “Amazon” the nextpage function want to show up. And when a visitors coming directly to my site they don’t want to see the nextpage function.

    E.g: site.com/?utm_source=amazon. (Nextpage button) want to show up

    e.g: site.com. (No next page button)I mean no page brake function.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Use “content_pagination” filter to conditionally return unbroken content. The current $post is passed, so if the referrer is not from Amazon, return $post->post_content instead of the usual $pages, the array of paged segments.

    Thread Starter Nvsh

    (@nithushan)

    Can you please share me the coding. “Content pagination

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    The filter documentation can be found here: https://developer.www.ads-software.com/reference/hooks/content_pagination/

    You could do something like:

    add_filter( 'content_pagination', 'namespace_check_source', 10, 2 );
    function namespace_check_source( $pages, $post ) {
      // your logic to check referrer
    return $pages;
    );

    That’s the first thing that comes to mind but you can of course potentially use different methods if you so choose to.

    Hope that steers you in the right direction.

    Thread Starter Nvsh

    (@nithushan)

    Can you share me the coding if the content source from facebook

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I need to filter my traffic source’ is closed to new replies.