Okay
  Public Ticket #2115204
How to create portfolio category page
Open

Comments

  • piotroq started the conversation

    Hello,

    The portfolio category page archive and blog page is the same page. 

    The archive.php is the same 

    <?php 
    get_template_part('templates/blog', 'structure');
    ?>

    I create file portfolio-category.php in folder templates.

    How to get template part templates/portfolio-category.php only display portfolio category archive?

    <?php 
    get_template_part('templates/portfolio', 'category');
    ?>

    Best regards

  • piotroq replied

    Problem resolved. I added template portfolio-category.php.

    I have two more questions.

    1. The all portfolio category is a title Archive. How to change title of portfolio category on this <?php echo single_cat_title(); ?> ?

    My currently code title.php: https://pastebin.com/wb1bS6TZ

    2. The blog and portfolio category currently display 3 number of post. How to change only portfolio category display all number of post?

    My currently code portfolio-category.php: https://pastebin.com/UX08JSe4

    Best regards

    Attached files:  archive.png

  •  1,100
    Qode replied

    Hello,

    1) Unfortunately There is no archive portfolio template. It require custom coding to change it. All archive pages are using archive.php template and theme modifications are required to change this behavior.

    2) In wp-content/themes/bridge/functions.php change https://www.screencast.com/t/mam7SWsn9

    elseif (is_archive()) {
                $title = esc_html__('Archive','bridge');
            }
    

    to this https://www.screencast.com/t/zJTmJNZOb2L

    elseif (is_archive()) {
                echo get_queried_object()->name;
            }

    3) Unfortunately as we mentioned in first answer they use same template. It can be changed in settings > reading but it will be applied to all archive pages. https://www.screencast.com/t/YgOhjjdVekY

    We can't access this links, it requires login.

    Let us know if there's anything else!

    Best Regards!

    Nicolas


    Explore our collection of 300+ premium WordPress themes on the Qode Interactive website.

    Don’t forget to sign up for our newsletter and be the first to find out all the latest news.

  • piotroq replied

    1. Ok

    2. Work

    3. I change this. I add child theme functions.php this code:

    function wpsites_query( $query ) {
    if ( $query->is_archive() && $query->is_main_query() && !is_admin() ) {        $query->set( 'posts_per_page', 100 );    }
    }
    add_action( 'pre_get_posts', 'wpsites_query' );

    And work.

    I have one more questions. Maybe you know how to add second image in portfolio page?  and the next step to display it to via get php code in template?

    Maybe i use this? https://github.com/voceconnect/multi-post-thumbnails/wiki

    Best regards

    Attached files:  screenshot-1.png

  •  1,441
    Qode replied

    Hello,

    Adding a second image in portfolio items would require a large amount of custom coding but, unfortunately we are not in a position to accept this amount of  custom work at the moment, because we primarily need to focus on providing Theme Support to all customers. We hope you understand.

    In case you are not familiar with programming, you could hire someone to do this for you. You could look for someone who you can hire for this kind of job at the following link: - http://studio.envato.com

    Thanks for understanding. 

    Daniel


    Explore our collection of 300+ premium WordPress themes on the Qode Interactive website.

    Don’t forget to sign up for our newsletter and be the first to find out all the latest news.