rep__get_listing_archive_page_url()

This function is used to retrieve the URL of a listing archive page based on the provided search type and category. It allows you to specify the search type and category and then returns the corresponding archive page URL.

Namespace

REP_Malcolm

Parameters

$type

string

Search type.

$category

string

Listing category.

Return

string

Search filter url.

Source

File: \includes\rep-helper-functions.php

function rep__get_listing_archive_page( $type, $category ){ 
    $type = strtolower( $type );
    $category = strtolower( $category );

    $archive_pages = lp__get_field_value( REP__PREFIX.'_listing_archive_pages', 'option' ); 
    $page = lp__array_key_value( "{$category}_{$type}_page", $archive_pages );
    
    if( ! $page ){
        $page = lp__array_key_value( "all_{$type}_page", $archive_pages );
    }

    if( ! $page ){
        $page = lp__array_key_value( "all_default_page", $archive_pages );
    }

    return $page;
    
}