Support Forums for LiveMesh Themes & Plugins › Forums › Wired Theme Support › Hide a portoflio item in archive
Tagged: portfolio item archive
- This topic has 5 replies, 2 voices, and was last updated 7 years ago by
Veena.
-
AuthorPosts
-
May 15, 2016 at 9:12 am #21665
Sperziemone
MemberHi,
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,
SimoneMay 18, 2016 at 10:58 am #21830Sperziemone
MemberI’d really like some help on this…
May 18, 2016 at 1:58 pm #21843Veena
ModeratorPls 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 .
May 18, 2016 at 2:01 pm #21845Veena
ModeratorBTW 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 .
May 18, 2016 at 4:02 pm #21852Sperziemone
MemberThanks, 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?
May 19, 2016 at 7:40 am #21897Veena
ModeratorWOW 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. -
AuthorPosts
- The forum ‘Wired Theme Support’ is closed to new topics and replies.