# ultimate-post/4.0.3/blocks/template/navigation-before.php

Post Grid Gutenberg Blocks – PostX, version 4.0.3. 12 lines.

- Page: https://pluginprobe.com/plugins/ultimate-post/4.0.3/code/blocks/template/navigation-before.php
- Raw: https://pluginprobe.com/plugins/ultimate-post/4.0.3/raw/blocks/template/navigation-before.php
- Modified: 2024-04-03T04:54:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ultimate-post/4.0.3/code/blocks/template/navigation-before.php#L10-L20`.

```php
<?php
defined( 'ABSPATH' ) || exit;

$attr["blockId"] = sanitize_html_class($attr["blockId"]);
$page_post_id = (isset($attr['currentPostId']) &&  $attr['currentPostId'])  ? sanitize_html_class($attr['currentPostId']) : ultimate_post()->get_page_post_id(ultimate_post()->get_ID(), $attr['blockId']);
$exclude_id = isset( $curr_post_id ) ? $curr_post_id  : "";
$self_post_id = 'data-selfpostid="' .( (isset($attr['currentPostId']) &&  $attr['currentPostId']) ? "yes" : "no"). '"';
$wraper_before .= '<div class="ultp-next-prev-wrap" data-pages="'.$pageNum.'" data-pagenum="1" data-blockid="'.$attr['blockId'].'" data-blockname="ultimate-post_'.$block_name.'" data-expost="'.$exclude_id.'" data-postid="'.$page_post_id.'" '.ultimate_post()->get_builder_attr($attr['queryType']).$self_post_id.'>';
    if ( 1 != $pageNum ) {
        $wraper_before .= ultimate_post()->next_prev();
    }
$wraper_before .= '</div>';
```
