queue  27
support
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Project Navi only for projects of a specific view

  1. #1
    Junior Member
    Join Date
    Aug 2015
    Posts
    26

    Project Navi only for projects of a specific view

    I have a lot of projects to different subjects. So i organize them in different views. But the project-navigation goes through all projects. Is it possible to limit this to only the projects of the view they belong to?

    Stephen

  2. #2
    Support Anand's Avatar
    Join Date
    Jan 2014
    Posts
    9,896
    Hi Stephen,

    My apologies to you but I don't quite follow your question, can you please detail it a bit and let me know on which page I can check the issue occuring?

  3. #3
    Junior Member
    Join Date
    Aug 2015
    Posts
    26
    On the single-project pages at the bottom is a navigation. This goes through all the projects i have created. So, if i have 24 Project and i organize them in 4 portfolio grids with 6 project each, then i want the user only to navigate through the 6 projects-single-pages that belong together. So the navigation on the project-single-pages should be in dependency of the portfolio grid and not just of all projects. Because the projects are of totaly different subjects.

    I hope i could make it more clear now.

    Stephen

  4. #4
    Support Anand's Avatar
    Join Date
    Jan 2014
    Posts
    9,896
    Hi Stephen,

    Yes, the requirement is now very clear. I'll check with the dev team to see if its possible to achieve it.

    Will reply as soon as I get a response from them. Thank you for your patience.

  5. #5
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    16,930
    Hello,

    try this:

    Go to theme folder and open single-project.php

    Find this:
    PHP Code:
            <?php $prev $content->prevPostLink(); ?>
            <?php $next $content->nextPostLink(); ?>
    Change it to this:
    PHP Code:
            <?php $prev $content->prevPostLinktrue'prj-category' ); ?>
            <?php $next $content->nextPostLinktrue'prj-category' ); ?>
    Then go to theme folder/theme/php/PeTheme and open PeThemeContent.php

    Find this (at the bottom):
    PHP Code:
        public function adjPostLink($previous false) {
            
    $post get_adjacent_post(false,""$previous);
            return 
    $post get_permalink($post) : "";    
        }

        public function 
    prevPostLink() {
            return 
    $this->adjPostLink(true);
        }

        public function 
    nextPostLink() {
            return 
    $this->adjPostLink(false);
        } 
    Change to this:
    PHP Code:
        public function adjPostLink$previous false$in_same_term false$taxonomy 'category' ) {
            
    $post get_adjacent_post$in_same_term''$previous$taxonomy );
            return 
    $post get_permalink($post) : "";    
        }

        public function 
    prevPostLink$in_same_term false$taxonomy 'category' ) {
            return 
    $this->adjPostLinktrue$in_same_term$taxonomy );
        }

        public function 
    nextPostLink$in_same_term false$taxonomy 'category' ) {
            return 
    $this->adjPostLinkfalse$in_same_term$taxonomy );
        } 
    This will make sure that only projects with the same tag are joined by the navigation on single project page. So just make sure you separate projects by unique tags and it should work.

  6. #6
    Junior Member
    Join Date
    Aug 2015
    Posts
    26
    Thank you for your detailed answer. Do I anderstand right: I give them the same tags and then they join the same navigation?

  7. #7
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    16,930
    Hi,

    correct, as long as they have at least one tag in common, it will be possible to navigate between them. Projects that do not have at least on tag in common will not be linked between each other.

  8. #8
    Junior Member
    Join Date
    Aug 2015
    Posts
    26
    Thats great! That gives total Flexebility. Thank you sooo much.

  9. #9
    Support Anand's Avatar
    Join Date
    Jan 2014
    Posts
    9,896
    If you are happy with our product & support, please consider giving it a 5 star rating.
    Good ratings promote sales and ensure continued feature updates.
    Rating is done via the "Downloads" page of your Envato account.

    Thank you

  10. #10
    Junior Member
    Join Date
    Feb 2018
    Posts
    2
    Hi there, I have a similar request, i just want the project-navigation to just show the next image of the current project in display. Not to move over to the next project. How can i do this?