• Resolved xoxixox

    (@xoxixox)


    Hello,
    in the theme Earth Pro, I would like to see only posts that are in same category
    I explain :
    in this page :
    https://www.a-picture-from-switzerland.com/?p=239

    I have at the end some links that are posts and I like it this way, BUT I can go to all the posts of the website and I only want to be able to read the post of the same category in my example “Nettoyage”
    Hope someone can help me, is there any way to do this.
    a plugin or a pho change

    fo what I have understand, the theme have a php page that contain something about navigation. maybe there is a line to change to indicate navigation in the actual catégory ?

    if ( ! function_exists( ‘earthpro_paging_nav’ ) ) :
    /**
    * Display navigation to next/previous set of posts when applicable.
    */
    function earthpro_paging_nav() {
    // Don’t print empty markup if there’s only one page.
    if ( $GLOBALS[‘wp_query’]->max_num_pages < 2 ) {
    return;
    }
    ?>
    <nav class=”navigation paging-navigation” role=”navigation”>
    <h1 class=”screen-reader-text”><?php _e( ‘Posts navigation’, ‘earthpro’ ); ?></h1>
    <div class=”nav-links”>

    <?php if ( get_next_posts_link() ) : ?>
    <div class=”nav-previous”><?php next_posts_link( __( ‘<span class=”meta-nav”>←</span> Older posts’, ‘earthpro’ ) ); ?></div>
    <?php endif; ?>

    <?php if ( get_previous_posts_link() ) : ?>
    <div class=”nav-next”><?php previous_posts_link( __( ‘Newer posts <span class=”meta-nav”>→</span>’, ‘earthpro’ ) ); ?></div>
    <?php endif; ?>

    </div><!– .nav-links –>
    </nav><!– .navigation –>
    <?php
    }
    endif;

    if ( ! function_exists( ‘earthpro_post_nav’ ) ) :
    /**
    * Display navigation to next/previous post when applicable.
    */
    function earthpro_post_nav() {
    // Don’t print empty markup if there’s nowhere to navigate.
    $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, ”, true );
    $next = get_adjacent_post( false, ”, false );

    if ( ! $next && ! $previous ) {
    return;
    }
    ?>
    <nav class=”navigation post-navigation” role=”navigation”>
    <h1 class=”screen-reader-text”><?php _e( ‘Post navigation’, ‘earthpro’ ); ?></h1>
    <div class=”nav-links”>
    <?php
    previous_post_link( ‘<div class=”nav-previous”>%link</div>’, _x( ‘<span class=”meta-nav”>←</span> %title’, ‘Previous post link’, ‘earthpro’ ) );
    next_post_link( ‘<div class=”nav-next”>%link</div>’, _x( ‘%title <span class=”meta-nav”>→</span>’, ‘Next post link’, ‘earthpro’ ) );
    ?>
    </div><!– .nav-links –>
    </nav><!– .navigation –>
    <?php
    }
    endif;

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is there any way you could contact your theme’s vendors for support with their theme?

    Thread Starter xoxixox

    (@xoxixox)

    Hi try to post another question about his theme but he never answered so I ask the community.
    My question is very commun if I believe google, but I’m a newbie in WordPress and no knowledge in PHP ??

    Thread Starter xoxixox

    (@xoxixox)

    I found how to do it ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Theme Earth Pro’ is closed to new replies.