Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter hessi9

    (@hessi9)

    Now it works well after fixing line footer.php(54) with:

    <?php printf( 'Theme: canard by %1$s.', '<a  rel="designer">Canard</a>' ); ?>
    Thread Starter hessi9

    (@hessi9)

    It looks like the exception above is the reason. It starts to occour after updating PHP from 7.1 to 8.0. So the Canard theme is not PHP 8.0 comppatible.

    Thread Starter hessi9

    (@hessi9)

    And I found the following error message in the log:

    Uncaught ArgumentCountError: 3 arguments are required, 2 givenStack trace: #0 /wp-content/themes/canard/footer.php(54): printf(‘Theme: %1$s by …’, ‘#1 /wp-includes/template.php(785): require_once(‘/home/web8n3a7f…’)<hr />#2 /wp-includes/template.php(720): load_template(‘/home/web8n3a7f…’, true, Array)<hr />#3 /wp-includes/general-template.php(92): locate_template(Array, true, true, Array)<hr />#4 /wp-content/themes/canard/archive.php(52): get_footer()<hr />#5 /wp-includes/template-loader.php(106): include(‘/home/web8n3a7f…’)<hr />#6 /wp-blog-header.php(19): require_once(‘/home/web8n3a7f…’)<hr />#7 /index.php(17): require(‘/home/web8n3a7f…’)<hr />#8 {main} thrown in /wp-content/themes/canard/footer.php on line 54</span><hr />Theme: Canard
    File: /wp-content/themes/canard/footer.php
    Line: 54

    Thread Starter hessi9

    (@hessi9)

    If I use the firefox inspector the reason for the black images is a background-image attribute at the surrounding <a class=”post-thumbnail”> html element that is missing after update.

    Additional I discovered the pages of blog posts are now missing their title image too. There the reason is a missing header element in the class=”side-content” element.

    All in all it looks to me like the Canard theme is unfortunaltely no longer compatible with the current WordPress version ??

    Thread Starter hessi9

    (@hessi9)

    Ok marking changes is not working – so copy this code if you need it:

    function nwm_collect_post_data( $nwm_location, $publish_date, $future, $date_format ) { 
    ?
    ?$the_post = get_page( $nwm_location->post_id );
    ?if( $the_post->post_excerpt_ml ) {
    ??$excerpt = $the_post->post_excerpt_ml;
    ?} else if( $the_post->post_excerpt ) {
    ??$excerpt = $the_post->post_excerpt;
    ??if (strpos($excerpt , '[:') === false) {
    ???$excerpt = apply_filters( 'the_excerpt', $excerpt );
    ??}
    ?} else {
    ??$excerpt = nwm_get_post_excerpt( $nwm_location->post_id );
    ?}
    ?if( $the_post->post_title_ml ) {
    ??$title = $the_post->post_title_ml;
    ?} else {
    ??$title = $the_post->post_title;
    ??if (strpos($title, '[:') === false) {
    ???$title = apply_filters( 'the_title', $title, $nwm_location->post_id );
    ??}
    ?}
    ?$permalink = get_permalink( $nwm_location->post_id );
    
    ?$nwm_post_data = array(
    ??'nwm_id' => ( int ) $nwm_location->nwm_id,
    ??'thumb' => esc_url( nwm_get_thumb( $nwm_location->thumb_id ) ),
    ??'url' => esc_url( $permalink ),
    ??'content' => strtr( esc_html( strtr( $excerpt, '[]', '][' ) ), '[]', ']['),
    ??'title' => strtr( esc_html( strtr( $title, '[]', '][' ) ), '[]', ']['),
    ??'location' => esc_html( $nwm_location->location ),
    ??'date' => esc_html( $publish_date ),
    ??arrival' => esc_html( nwm_convert_date_format( $date_format, $nwm_location->arrival ) ),
    ??'departure' => esc_html( nwm_convert_date_format( $date_format, $nwm_location->departure ) ),
    ??'future' => esc_html( $future )
    ?);
    ?
    ?return $nwm_post_data;
    }

    You can modify the seach query to allow search for parts of the title.
    Edit the admin/nwm-admin-functions.php
    Look for function nwm_find_post_title()
    Replace “AND post_title = %s” with “AND post_title LIKE %s”
    Save the changes

    Now you can search with %keyword% as post title for the first post containing the keyword as part of the title. We need to do so too as we use a multilanguage plugin modifying the title field.

    You can modify the seach query to allow search for parts of the title.
    Edit the admin/nwm-admin-functions.php
    Look for function nwm_find_post_title()
    Replace “AND post_title = %s” with “AND post_title LIKE %s”
    Save the changes

    Now you can search with %keyword% as post title for the first post containing the keyword as part of the title. We need to do so too as we use a multilanguage plugin modifying the title field.

Viewing 7 replies - 1 through 7 (of 7 total)