This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: dont show tag in search results

#48138
profudeistorieprofudeistorie
Participant

Hi

I saw i have an error an results page: https://oradeistorie.ro/?s=bacalaureat&asp_active=1&p_asid=2&p_asp_data=1&customset%5B%5D=dlp_document&customset%5B%5D=glossary&customset%5B%5D=post&asp_gen%5B%5D=content&asp_gen%5B%5D=title&filters_initial=1&filters_changed=0&qtranslate_lang=0&asp_highlight=1&current_page_id=44893

I have these error:

Warning
: urlencode() expects parameter 1 to be string, array given in
/var/www/clients/client1/web5/web/wp-content/themes/odiseea/functions.php
on line
499

Warning
: urlencode() expects parameter 1 to be string, array given in
/var/www/clients/client1/web5/web/wp-content/themes/odiseea/functions.php
on line
499

———————————

I dont know php and dont know to resolve these error. Can you help me, please?

My code from functions php is this:

/**
* Display navigation to next/previous set of posts when applicable.
* Based on paging nav function from Twenty Fourteen
*/
if ( ! function_exists( ‘opencode_paging_nav’ ) ) :

function opencode_paging_nav() {

// Don’t print empty markup if there’s only one page.
if ( $GLOBALS[‘wp_query’]->max_num_pages < 2 ) {
return;
}

$paged = get_query_var( ‘paged’ ) ? intval( get_query_var( ‘paged’ ) ) : 1;
$pagenum_link = html_entity_decode( get_pagenum_link() );
$query_args = array();
$url_parts = explode( ‘?’, $pagenum_link );

if ( isset( $url_parts[1] ) ) {
wp_parse_str( $url_parts[1], $query_args );
}

$pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
$pagenum_link = trailingslashit( $pagenum_link ) . ‘%_%’;

$format = $GLOBALS[‘wp_rewrite’]->using_index_permalinks() && ! strpos( $pagenum_link, ‘index.php’ ) ? ‘index.php/’ : ”;
$format .= $GLOBALS[‘wp_rewrite’]->using_permalinks() ? user_trailingslashit( ‘page/%#%’, ‘paged’ ) : ‘?paged=%#%’;

// Set up paginated links.
$links = paginate_links( array(
‘base’ => $pagenum_link,
‘format’ => $format,
‘total’ => $GLOBALS[‘wp_query’]->max_num_pages,
‘current’ => $paged,
‘mid_size’ => 3,
‘add_args’ => array_map( ‘urlencode’, $query_args ),
‘prev_text’ => esc_attr__( ‘«’, ‘opencode’ ),
‘next_text’ => esc_attr__( ‘»’, ‘opencode’ ),
‘type’ => ‘list’,
) );

if ( $links ) :

?>
<nav class=”pagination” role=”navigation”>
<h1 class=”screen-reader-text”><?php esc_attr__( ‘Posts navigation’, ‘opencode’ ); ?></h1>
<?php echo $links; // function arguments escaped individually, see lines #348 thru #358 ?>
</nav><!– .navigation –>

<?php
endif;
}
endif;