WordPress.org

Forums

twentythirteen_paging_nav(); problem (19 posts)

  1. Kins
    Member
    Posted 2 years ago #

    Hello,

    when i make a them child for thirteen, if i copy the category.php or single.php in my theme child directory i have an error

    fatal error: Call to undefined function twentythirteen_paging_nav() in C:\wamp\www\wordpress\wp-content\themes\mytheme\category.php

    i have tried many things but nothing worked. If i remove the function, it works but i have no paging...

    Can you help me, please?

    Thanx.

  2. Jose Castaneda
    THEME COFFEE MONKEY
    Posted 2 years ago #

    What's your style.css header look like?

  3. Kins
    Member
    Posted 2 years ago #

    /*
    Theme Name:     Thème monthème (thirteen Child)
    Theme URI:      http://example.com/
    Description:    Thème Lisbeth de beauté
    Author:         Votre nom ici
    Author URI:     http://example.com/about/
    Template:       twentythirteen
    Version:        0.1.0
    */
    
    @import url("../twentythirteen/style.css");

    I don't believe the error is there : all the other things i made in my theme child works.

  4. Jose Castaneda
    THEME COFFEE MONKEY
    Posted 2 years ago #

    That seems a little odd. I'm guessing you haven't modified the twenty-thirteen theme, correct?

  5. Kins
    Member
    Posted 2 years ago #

    I haven't...
    It's totally odd.

  6. Kins
    Member
    Posted 2 years ago #

    But warning: i have a functions.php in my child theme.
    But nothing important i guess:

    <?php
    register_sidebar( array(
    'name' => __( 'Footer Area One', 'twentyfourteen' ),
    'id' => 'sidebar-4',
    'description' => __( 'An optional widget area for your site footer', 'twentyfourteen' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget' => "</aside>",
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    
    register_sidebar( array(
    'name' => __( 'Footer Area Two', 'twentyfourteen' ),
    'id' => 'sidebar-5',
    'description' => __( 'An optional widget area for your site footer', 'twentyfourteen' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget' => "</aside>",
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    
    register_sidebar( array(
    'name' => __( 'Footer Area Three', 'twentyfourteen' ),
    'id' => 'sidebar-6',
    'description' => __( 'An optional widget area for your site footer', 'twentyfourteen' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget' => "</aside>",
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    ?>
    
    <?php function custom_excerpt_length( $length ) {
    	return 40;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
    function new_excerpt_more( $more ) {
    	return '<div class="fixclear"></div><a class="read-more" href="'. get_permalink( get_the_ID() ) . '">Read More</a>';
    }
    add_filter( 'excerpt_more', 'new_excerpt_more' );
    
    ?>
  7. Jose Castaneda
    THEME COFFEE MONKEY
    Posted 2 years ago #

    Do you get an error only when you are on a category page? When does the error occur?

  8. Kins
    Member
    Posted 2 years ago #

    When i have a category page or a single page:

    fatal error: Call to undefined function twentythirteen_paging_nav() in C:\wamp\www\wordpress\wp-content\themes\mytheme\category.php

    yeah strange.

  9. Jose Castaneda
    THEME COFFEE MONKEY
    Posted 2 years ago #

    Really strange. When I have some free time I'll try and re-create this see if I can find some solution.

  10. esmi
    Forum Moderator
    Posted 2 years ago #

    What happens if you switch back to the unedited parent theme?

  11. Kins
    Member
    Posted 2 years ago #

    @esmi: with the parent theme activated, all work fine!

    I have also tried to re install the theme. But it's the same.
    onte thing strange too: when you're in back office and you have your themes to choose, twenty thirteen have the title tewnty twelve... strange even if i have it reinstalled.

  12. esmi
    Forum Moderator
    Posted 2 years ago #

    What happens if you just remove your child theme's category.php template file?

  13. Kins
    Member
    Posted 2 years ago #

    it works.
    But i must have category and single php in my theme child to change some things.

  14. esmi
    Forum Moderator
    Posted 2 years ago #

    Well, at least this narrows the issue down to your category template file. Can you drop a copy of that file into a pastebin and post the pastebin url here so that we can have a look at it?

  15. Kins
    Member
    Posted 2 years ago #

    If u want but it's just a copy from parent theme's category.php
    It's juste the same file:

    ici

  16. esmi
    Forum Moderator
    Posted 2 years ago #

    If it's exactly the same as the parent's template file, why have you included it in the child theme? If you remove it, the child will automatically use the parent's copy.

  17. Kins
    Member
    Posted 2 years ago #

    To do changes.

    But if it doesnt work why should i continue???

    It's interesting to know why it doesn't work...

    In my final purpose i'll have this:

    this

    But the problem stay the same.

  18. Kins
    Member
    Posted 2 years ago #

    Hello.

    I have found nothing till now...

    Anyone to help please?

  19. michalzuber
    Member
    Posted 2 years ago #

    Hi, had the same issue and a copied some code from default template.
    The function was part of the Loop.
    I found it with grep -r twentyfourteen_paging_nav * in terminal.

    if ( have_posts() ) :
        // Start the Loop.
        while ( have_posts() ) : the_post();
    
            /*
             * Include the post format-specific template for the content. If you want to
             * use this in a child theme, then include a file called called content-___.php
             * (where ___ is the post format) and that will be used instead.
             */
            get_template_part( 'content', get_post_format() );
    
        endwhile;
        // Previous/next post navigation.
        twentyfourteen_paging_nav();
    
    else :
        // If no content, include the "No posts found" template.
        get_template_part( 'content', 'none' );
    
    endif;

Topic Closed

This topic has been closed to new replies.

About this Topic