the answer for all question about Oxygen Builder plugin and WordPress

Hi there – quick question: I need to get the post number (not $currentID) for a

Hi there – quick question: I need to get the post number (not $currentID) for a repeater card design. Is there an elegant solution for that?
I managed to do this via a script I found online:

<?php
function Get_Post_Number($postID){
$temp_query = $wp_query;
$postNumberQuery = new WP_Query(‘orderby=date&posts_per_page=-1′);
$counter = 1;
$postCount = 0;
if($postNumberQuery->have_posts()) :
while ($postNumberQuery->have_posts()) : $postNumberQuery->the_post();
if ($postID == get_the_ID()){…

Lainnya



Source

2 Comments
  1. Davor Mlinarić says

    post number? to show 1,2,3,4 in card? https://codepen.io/dmlinaric/pen/GRWpYLd

  2. Davor Mlinarić says

    is this what you need?
    https://pizza.webbox.hr/pagination/

Leave A Reply

Your email address will not be published.

Oxyrealm Docs