Conditional Output on the First Page of Archives in Bricks

A user asks:

if i have wg. category page with list of items – i have 3 pages. i want to show some text only on first page.

its possible to make it?

We can check the value of get_query_var( 'paged' ) in a dynamic data condition to output an element only on the first page of paginated archives in Bricks.

For example,

example.com/category/nature/:

example.com/category/nature/page/2:

Step 1

Whitelist the get_query_var function.

Ex.:

<?php 

add_filter( 'bricks/code/echo_function_names', function() {
  return [
    'get_query_var'
  ];
} );

You should also add other functions (native or custom) being used in your Bricks instance besides get_query_var. This can be checked at Bricks → Settings → Custom code by clicking the Code review button.

More info on whitelisting can be found here.

Step 2

Edit your archive template with Bricks.

Apply a dynamic data condition on the element that you wish to be output only on the first page like this:

{echo:get_query_var(paged)}