-
AuthorPosts
-
December 8, 2014 at 1:06 pm #160624
Hello,
Which document to I modify to change the Portfolio landing page template?
I would like to be able to have content above the portfolio feed.
December 9, 2014 at 12:30 am #160890Hey there,
We recommend that you setup a child theme first. See http://theme.co/x/member/kb/how-to-setup-child-themes/ for instructions. After that, copy template-layout-portfolio.php located in wp-content\themes\x\framework\views\(YOUR STACK) to the same folder in your child theme wp-content\themes\x\framework\views\(YOUR STACK). Open the copied file and put your content right above the line
<?php x_get_view( 'global', '_portfolio' ); ?>
Hope that helps. 🙂
December 15, 2014 at 6:38 pm #165149on it.
MUCHAS GRACIAS!!! hope this is helpful for others and not redundant.
December 15, 2014 at 6:46 pm #165150does the integrity light child theme count? is that going to be overwritten on update?
December 15, 2014 at 6:49 pm #165151one more thing. is there anyway to modify the page so that i can add content in the backend of the site? with the visual composer even? My client wont be able to modify the content if we have to go through the file structure each time.
December 16, 2014 at 1:59 am #165315Hi,
No, the child theme won’t get overwritten on theme update.
With regards to portfolio page.
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Then create file _portfolio.php in wp-content\themes\{X-CHILD-DIRECTORY}\framework\views\global
and copy the code below into that file.<?php // ============================================================================= // VIEWS/GLOBAL/_PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Includes the portfolio output. // ============================================================================= $stack = x_get_stack(); $entry_id = get_the_ID(); $paged = ( is_front_page() ) ? get_query_var( 'page' ) : ( ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1 ); $cols = get_post_meta( $entry_id, '_x_portfolio_columns', true ); $count = get_post_meta( $entry_id, '_x_portfolio_posts_per_page', true ); $filters = get_post_meta( $entry_id, '_x_portfolio_category_filters', true ); switch ( $cols ) { case 'One' : $cols = 1; break; case 'Two' : $cols = 2; break; case 'Three' : $cols = 3; break; case 'Four' : $cols = 4; break; } ?> <?php x_get_view( 'global', '_script', 'isotope-portfolio' ); ?> <div id="x-iso-container" class="x-iso-container x-iso-container-portfolio cols-<?php echo $cols; ?>"> <?php $page_object = get_page( get_queried_object_id()); echo '<div class="portfolio-page-content">'.do_shortcode($page_object->post_content).'</div>'; ?> <?php 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' => 'id', 'terms' => $filters ) ) ); } $wp_query = new WP_Query( $args ); ?> <?php if ( $wp_query->have_posts() ) : ?> <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> <?php if ( $stack != 'ethos' ) : ?> <?php x_get_view( $stack, 'content', 'portfolio' ); ?> <?php else : ?> <?php x_ethos_entry_cover( 'main-content' ); ?> <?php endif; ?> <?php endwhile; ?> <?php endif; ?> </div> <?php pagenavi(); ?> <?php wp_reset_query(); ?>
You can then add a content to your page in the backend of the site and will display in your portfolio page.
Hope this helps.
December 17, 2014 at 3:06 pm #166633Hey buddies,
I did just as you said and the ol portfolio landing page is looking kind of funky now.
i deleted the template-layout-portfolio.php from the first reply solution you gave me but it was still looking cray cray so i added it back in for launch tomorrow and removed the second document with code above. wondering if there is a real solution for this specific modification.
thanks for all of your awesome effort. im telling everyone i know to buy X
December 18, 2014 at 4:18 am #166924Hi Ohia,
Thanks for writing in!
Upon checking, it seems you’re website is in coming soon mode. Would you mind providing us with WordPress login credentials so we can take a closer look? To do this, you can make a post with the following info:
Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks!
December 18, 2014 at 12:19 pm #167166This reply has been marked as private.December 19, 2014 at 5:47 am #167582Hi Ohia,
Thanks for the logins!
Were you able to resolve this issue? As upon checking, the page looks fine to me (see: http://prntscr.com/5ijebk) and the content is correctly appearing from the backend page. Would you mind confirming?
Page: http://tineopatagonia.com/futaleufu-activities/
Thanks!
December 22, 2014 at 1:04 pm #169090Oh snap. No actually I did not figure it out. It appears that the content is working correctly in the backend BUT the content that was there in the VC was just being saved for when it did work properly. I deleted the backend content and you can see on the front end that the hardcoded content is still on the frontend. I put it in the actual template.
Does it behoove us to have content on the blog feed page? I really dont see this very often in the world of web and I don’t really understand why our site should be different than anyone elses. My boss is learning A LOT about SEO (and can get overexcited about it, like all good geeks should) and swears that we need content on this page but I feel like X theme wouldn’t purposefully provide users with a page that gets bad reviews for SEO. Is there any advice you can give about why the portfolio and blog landing pages do not readily include areas for content? Seems like if it was needed you smarty pantses would make it so.
In the mean time I’d like to deliver to the client/my boss so is there a way to make the portfolio and blog feed landing pages capable of having backend content creation and modification?
MUCHAS GRACIAS y FELIZ NAVIDAD,
Ohia
December 22, 2014 at 11:37 pm #169518Hey Ohia,
That may be because of caching. The cached page is being served. Please clear all the caches and also your browser history. Let us know how it goes.
Thanks.
December 23, 2014 at 2:58 pm #170222i cleared all browsing history and the customized template-layout-portfolio.php solution suggested in your first reply is what is being served.
It appeared for you that the content was working correctly in the backend BUT the content that was there in the VC was just being saved for when it did work properly. I deleted the backend content and you can see on the frontend that the hardcoded content is still on the frontend. I put it in the actual template.
Does it behoove us to have content on the blog feed page? I really dont see this very often in the world of web and I don’t really understand why our site should be different than anyone elses. My boss is learning A LOT about SEO (and can get overexcited about it, like all good geeks should) and swears that we need content on this page but I feel like X theme wouldn’t purposefully provide users with a page that gets bad reviews for SEO. Is there any advice you can give about why the portfolio and blog landing pages do not readily include areas for content? Seems like if it was needed you smarty pantses would make it so.
In the mean time I’d like to deliver to the client/my boss so is there a way to make the portfolio and blog feed landing pages capable of having backend content creation and modification?
thanks again
ohiaDecember 23, 2014 at 2:59 pm #170223the question that is most important is, can the backend portfolio and blog feed landing pages be made capable of having content served via visual composer at the top?
December 23, 2014 at 11:37 pm #170519Hi,
By default, portfolio layout and blog layout are not designed to display it’s content
but it can be done through code customization as the one given above.I have tested the code given here https://theme.co/x/member/forums/topic/portfolio-landing-page-modification/#post-165315
and the code actually works.Would you mind providing us your ftp login details so we can take a closer look.
Thanks
-
AuthorPosts