• Hi,

    I’ve just tries to update Customizr theme to 3.4.37 version and I get a bad issue when opening a single blog post. This is the message error:

    Fatal error: Class ‘TC_post_navigation’ not found in /home/itelnamemd/i-tel.it/wp-content/themes/customizr-child/functions.php on line 336

    Since i’m using the snippet “Removing the post navigation block of links” in my in my function.php file, I changed the code that Menaka S suggest in the last comment to:

    add_action ( ‘wp_head’, ‘remove_single_post_nav_links’);
    function remove_single_post_nav_links() {
    //we only want to remove those nav links for a sinlge post and not for the list of posts
    if ( !is_single() )
    return;
    remove_action ( ‘__after_loop’ , array( CZR_post_navigation::$instance , ‘tc_post_nav’ ), 20 );
    }

    The single blog post appears again, but nav links continue to show. Is there anything I can do or do I need to hire premium support?

    thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,
    take a look at this:
    https://presscustomizr.com/customizr-pro-v1-2-30-customizr-free-v3-4-30-release-note/

    method prefixes have been also changed from tc_ to czr_fn_

    This means that also tc_post_nav must be replaced with czr_fn_post_nav.

    Hope this helps.

    BTW since many versions ago there’s an option to control the post navigation visibility in the customizer, doesn’t work?

    Thread Starter saramenc

    (@saramenc)

    Many thanks, I was actually wondering about that tc_post_nav old prefix in the code suggested, but figured it was right..now you confirm my doubts! I’ll try renaming it and let you know. ??

    Thread Starter saramenc

    (@saramenc)

    No, didn’t work, unfortunately. :\

    Works fine here

    are you sure you’re using the correct single quotes?
    wrong -> ‘
    wrong -> ’

    correct -> '

    But again, that code isn’t needed anymore. You can disable the post navigation in single posts through the customizer.
    Appearance -> Customize -> Content … -> Post/Page Navigation -> Display posts navigation in single posts

    Thread Starter saramenc

    (@saramenc)

    Thanks so I’ll get rid of that snippet. For quote…maybe you’re right, I’ll check just to understand but as I directly copied and pasted the code from Customizr snippet page think they are the right ones. But sure I made some mistake.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Customizr theme bad update issue because of a snippet in child theme’ is closed to new replies.