Hide a portoflio item in archive

Support Forums for LiveMesh Themes & Plugins Forums Wired Theme Support Hide a portoflio item in archive

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #21665
    Sperziemone
    Member

    Hi,

    On the homepage, there is the “My work” overlay on a portfolio item, right? So you can’t see that portfolio item on the homepage. But you CAN see it in the portfolio archive page.

    The thing is: I don’t want there to be a portfolio item underneath this overlay. Or in other words: I don’t want this portfolio item to be seen in the archive page. I just want the portfolio items visible on my homepage to be in the archive, because I use a fake/default portfolio item to fill up the overlay.

    Can I hide that fake portfolio item in the archive page? Or can I remove the portfolio item underneath the overlay without making the lay-out of the portfolio items change?

    Kind regards,
    Simone

    #21830
    Sperziemone
    Member

    I’d really like some help on this…

    #21843
    Veena
    Moderator

    Pls modify the below code lines starting at line no:23 in file framework/functions/portfolio-functions.php from

    $query_args = array(
                'post_type' => 'portfolio',
                'posts_per_page' => $args['posts_per_page'],
                'paged' => $paged,
                'orderby' => 'menu_order',
                'order' => 'ASC'
            );
    

    to

    $query_args = array(
                'post_type' => 'portfolio',
                'posts_per_page' => $args['posts_per_page'],
                'paged' => $paged,
                'orderby' => 'menu_order',
                'order' => 'ASC',
                'post__not_in' => array( 153 )
            );
    

    You need to specify the post id of the item that you want to hide as the value of post_not_in parameter .

    #21845
    Veena
    Moderator

    BTW you can can override this function – wired_display_portfolio_content() in child theme so that your changes will be retained if you update the theme later .

    #21852
    Sperziemone
    Member

    Thanks, that did the trick 🙂
    I think my site is done now. You can see what I did with your theme here: http://www.supertiny.nl/

    BTW, what do you mean by overriding ‘wired_display_portfolio_content()’? I do use the child theme, but I don’t know how to tweak .php files without losing changes when I update. Should I just copy the .php file I tweaked to the child folder in the right location?

    #21897
    Veena
    Moderator

    WOW your site is AMAZING ..

    You just copy the modified wired_display_portfolio_content function to your functions.php file in child theme.
    ie, from line no:3-43 and save the changes.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Wired Theme Support’ is closed to new topics and replies.