lib/Post.php
public function prev( $in_same_term = false ) {
		if ( isset($this->_prev) && isset($this->_prev[$in_same_term]) ) {
			return $this->_prev[$in_same_term];
		}
		global $post;
		$old_global = $post;
		$post = $this;
		$within_taxonomy = ($in_same_term) ? $in_same_term : 'category';
		$adjacent = get_adjacent_post(($in_same_term), '', true, $within_taxonomy);
		$prev_in_taxonomy = false;
		if ( $adjacent ) {
			$prev_in_taxonomy = new $this->PostClass($adjacent);
		}
		$this->_prev[$in_same_term] = $prev_in_taxonomy;
		$post = $old_global;
		return $this->_prev[$in_same_term];
	}
public function prev( $in_same_term = false ) {
		if ( isset($this->_prev) && isset($this->_prev[$in_same_term]) ) {
			return $this->_prev[$in_same_term];
		}
		global $post;
		$old_global = $post;
		$post = $this;
		$within_taxonomy = ($in_same_term) ? $in_same_term : 'category';
		$adjacent = get_adjacent_post(($in_same_term), '', true, $within_taxonomy);
		$prev_in_taxonomy = false;
		if ( $adjacent ) {
			$prev_in_taxonomy = new $this->PostClass($adjacent);
		}
		$this->_prev[$in_same_term] = $prev_in_taxonomy;
		$post = $old_global;
		return $this->_prev[$in_same_term];
	}
public function prev ( $ in_same_term = false ) { if ( isset ( $ this -> _prev ) && isset ( $ this -> _prev [ $ in_same_term ] ) ) { return $ this -> _prev [ $ in_same_term ] ; } global $ post ; $ old_global = $ post ; $ post = $ this ; $ within_taxonomy = ( $ in_same_term ) ? $ in_same_term : 'category' ; $ adjacent = get_adjacent_post ( ( $ in_same_term ) , '' , true , $ within_taxonomy ) ; $ prev_in_taxonomy = false ; if ( $ adjacent ) { $ prev_in_taxonomy = new $ this -> PostClass ( $ adjacent ) ; } $ this -> _prev [ $ in_same_term ] = $ prev_in_taxonomy ; $ post = $ old_global ; return $ this -> _prev [ $ in_same_term ] ; }
Get the previous post in a set
@api
@example
```twig
<h4>Prior Entry:</h4>
<h3>{{post.prev.title}}</h3>
<p>{{post.prev.get_preview(25)}}</p>
```
@param bool $in_same_term
@return mixed
Get the previous post in a set