• Resolved senyoraangelica

    (@senyoraangelica)


    Hello. After updating wordpress, it seems that my codes in a pod page turns into a mess whenever I click the update button.

    For example:

    <form method="get" class="" action="">
            <input name="type" value="books" type="hidden">
    
            <input class="" name="search" value="" type="text">
    
            <input class="" value="Search" type="submit">
    </form>
    <?php
    
    $pod_books = pods( 'books' );
    
    $params = array(
        'orderby' => 'book_year DESC',
        'limit' => 2,
        'search' => false,
        'where' => array(
             'relation' => 'OR',
              array(
                 'key' => 'book_title',
                 'value' => pods_var( 'search' ),
              ),
              array(
                 'key' => 'book_author',
                 'value' => pods_var( 'search' ),
    
              ),
              array(
                 'key' => 'book_year',
                 'value' => pods_var( 'search' ),
           )
    ));
    
    echo $pod_books->find( $params )->template( 'book_detail' );
    
    echo $pod_books->pagination();
    
    ?>

    ..will turn into this after clicking update:
    (regardless whether I made any changes to the code or not)

    <form method="get" class="" action="">rnrn <input class="" name="search" value="" type="text">rnrn <input class="" value="Search" type="submit">rn</form>rn<?phprnrn$pod_books = pods( 'books' );rnrn$params = array(rn 'orderby' => 'book_year DESC',rn 'limit' => 2,rn 'search' => false,rn 'where' => array(rn 'relation' => 'OR',rn array(rn 'key' => 'book_title',rn 'value' => pods_var( 'search' ),rn ),rn array(rn 'key' => 'book_author',rn 'value' => pods_var( 'search' ),rnrn ),rn array(rn 'key' => 'book_year',rn 'value' => pods_var( 'search' ),rn )rn));rnrnecho $pod_books->find( $params )->template( 'book_detail' );rnrnecho $pod_books->pagination();rnrn?>

    The only way I can turn it to normal is by restoring a previous revision.

    https://www.ads-software.com/plugins/pods/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug after upgrading wordpress’ is closed to new replies.