Tagged: x
-
AuthorPosts
-
January 15, 2017 at 1:41 pm #1331050
Farhad EParticipantHi,
Im getting erros below!
Warning: in_array() expects parameter 2 to be array, string given in /nfs/c05/h05/mnt/159559/domains/go.d-seven.com/html/ad_d/wp-content/themes/x/framework/functions/global/portfolio.php on line 112
Warning: Invalid argument supplied for foreach() in /nfs/c05/h05/mnt/159559/domains/go.d-seven.com/html/ad_d/wp-content/themes/x/framework/functions/global/portfolio.php on line 128
Whats gone wrong? Please advise!!
January 15, 2017 at 10:48 pm #1331462
RupokMemberHi there,
Thanks for writing in! Let’s select the Portfolio Category and Portfolio Parent and save again. Let us know if that helps.
January 19, 2017 at 1:36 am #1336310
Farhad EParticipantThanks! its working now.
On Portfolio page, it is showing the most recent post first. I would like to change it to oldest post first – how can this be done?
Many thanks
January 19, 2017 at 5:05 am #1336484
RadModeratorHi there,
You’ll have to copy this file from wp-content/themes/x/framework/functions/global/portfolio.php to wp-content/themes/x-child/framework/functions/global/portfolio.php
Then change the order by changing this code,
if ( count( $filters ) == 1 && in_array( 'All Categories', $filters ) ) { $args = array( 'post_type' => 'x-portfolio', 'posts_per_page' => $count, 'paged' => $paged ); } else { $args = array( 'post_type' => 'x-portfolio', 'posts_per_page' => $count, 'paged' => $paged, 'tax_query' => array( array( 'taxonomy' => 'portfolio-category', 'field' => 'term_id', 'terms' => $filters ) ) ); }to this
if ( count( $filters ) == 1 && in_array( 'All Categories', $filters ) ) { $args = array( 'post_type' => 'x-portfolio', 'posts_per_page' => $count, 'paged' => $paged, 'order' => 'ASC', 'orderby' => 'date' ); } else { $args = array( 'post_type' => 'x-portfolio', 'posts_per_page' => $count, 'paged' => $paged, 'tax_query' => array( array( 'taxonomy' => 'portfolio-category', 'field' => 'term_id', 'terms' => $filters ), 'order' => 'ASC', 'orderby' => 'date' ) ); }Cheers!
January 24, 2017 at 9:44 am #1343276
Farhad EParticipantHi,
Thanks for the code help – its working.
In portfolio page index, is there a way to show the Portfolio title on mouse hover.
At the moment on mouse hover, the image opacity is reduced, and the permalink icon appears – how can I show the post title in place of the permalink icon?
Many thanks.
January 24, 2017 at 11:30 am #1343432
RupokMemberHi there,
Thanks for writing back. Would you provide your URL so that we can check your setup?
Cheers!
January 28, 2017 at 11:21 am #1348963
Farhad EParticipantHi,
Please see below:
http://go.d-seven.com/ad_d/projects/January 28, 2017 at 11:13 pm #1349303
Rue NelModeratorHello There,
Thanks for updating in! By default in the icon stack, the titles for the portfolio items will not be displayed. If you want to display it, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file<?php // ============================================================================= // VIEWS/ICON/CONTENT-PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Portfolio post output for Icon. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-wrap"> <div class="x-container max width"> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> <?php x_icon_entry_meta(); ?> </header> <div class="entry-featured"> <?php x_portfolio_item_featured_content(); ?> </div> <?php if ( is_singular() ) : ?> <?php x_get_view( 'global', '_content', 'the-content' ); ?> <div class="entry-extra"> <?php x_portfolio_item_tags(); ?> <?php x_portfolio_item_project_link(); ?> <?php x_portfolio_item_social(); ?> </div> <?php endif; ?> </div> </div> </article>3] Save the file named as
content-portfolio.php
4] Upload this file to your server in the child theme’s folder
wp-content/themes/x-child/framework/views/
5] And then you will need this custom css too. please add the following css code in the customizer, Appearance > Customize > Custom > CSS.x-iso-container-portfolio .x-portfolio { position: relative; } .x-iso-container-portfolio .x-portfolio .entry-header { background-color: rgba(255,255,255,0.5); position: absolute; padding: 10%; top: 0; left: 0; z-index: 10; height: 100%; opacity: 0; transition: all 1s ease; } .x-iso-container-portfolio .x-portfolio:hover .entry-header { opacity: 1; }We would loved to know if this has work for you. Thank you.
January 29, 2017 at 7:31 am #1349526
Farhad EParticipantHi,
Its working yes.
File should be under wp-content/themes/x-child/framework/views/icon for it to work
The CSS is making it looke good with some adjustments, but the container “<header class=”entry-header”>” is set to width:100%; – and this is causing it to go outside the frame. What would be a good way to fix this so it stays within the frame?
Many thanks.
January 29, 2017 at 3:34 pm #1349889
RadModeratorHi there,
Try 80%, there is a padding of 10% on both side. It should total to 100% (width + padding).
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1331050 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
