Tagged: x
-
AuthorPosts
-
July 20, 2016 at 6:06 pm #1096061
I have three similar queries.
1
I have created portfolio page using portfolio layout. Under it i have added few portfolio items.In portfolio item page we have small grid like icon to go back to portfolio.
I want to add the same button to portfolio as well. So that when I click that it can go to another parent page.
I have installed child theme. Is there anyway I can add this button to this portfolio page.?
I have tried with cornerstone and vc to edit but nothing is changing.
2
There are left ,right arrows present for portfolio items . I want to restrict them to particular category only instead of showing all the portfolio items when we click the right left arrows buttons.3
want to add the same arrows for portfolio pages as well.Please let us know how can we achieve this.
Order.
Main Page (Contains Albums)
http://www.trivikramwords.com/movies/Portfolio Page (Contains Albums)
http://www.trivikramwords.com/movies/teenmaar/Portfolio Item (contains Images per page)
http://www.trivikramwords.com/movie-dialogues/padi-samvatsaraalu/Since word press don’t provide this option with galleries, I am trying this option.
July 20, 2016 at 10:10 pm #1096382Hello There,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
Thanks.
July 21, 2016 at 12:35 am #1096522Hi Prasant,
I have Updated the URL details. Please let me know if any details required.
July 21, 2016 at 1:15 am #1096550Hello There,
Thanks for writing in!
1] This icon is purposely designed for the single portfolio item only. If you want to add something like it in the portfolio page, you have to customize the portfolio page template. To do that, 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/ETHOS/TEMPLATE-LAYOUT-PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Portfolio page output for Ethos. // ============================================================================= ?> <?php get_header(); ?> <div class="x-container max width main"> <div class="offset cf"> <div class="<?php x_main_content_class(); ?>" role="main"> <div class="entry-top-navigation"> <a href="#your-link-here" class="entry-parent" title="Your link title here"><i class="x-icon-th" data-x-icon=""></i></a> </div> <?php x_portfolio_filters(); ?> <?php x_get_view( 'global', '_portfolio' ); ?> </div> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?>
Please copy the raw code here (http://pastebin.com/nXDDBtUV) to preserve the unicode html entities or the data-x-icon value.
3] Save the file named as
template-layout-portfolio.php
4] Upload this file to your server in the child theme’s folder
wp-content/themes/x-child/framework/views/ethos/
2] To resolve this issue, please insert this following code in your child theme’s functions.php file.
function x_entry_navigation() { $stack = x_get_stack(); if ( $stack == 'ethos' ) { $left_icon = '<i class="x-icon-chevron-left" data-x-icon=""></i>'; $right_icon = '<i class="x-icon-chevron-right" data-x-icon=""></i>'; } else { $left_icon = '<i class="x-icon-arrow-left" data-x-icon=""></i>'; $right_icon = '<i class="x-icon-arrow-right" data-x-icon=""></i>'; } $is_ltr = ! is_rtl(); $prev_post = get_adjacent_post( true, '', false ); $next_post = get_adjacent_post( true, '', true ); $prev_icon = ( $is_ltr ) ? $left_icon : $right_icon; $next_icon = ( $is_ltr ) ? $right_icon : $left_icon; ?> <div class="x-nav-articles"> <?php if ( $prev_post ) : ?> <a href="<?php echo get_permalink( $prev_post ); ?>" title="<?php __( 'Previous Post', '__x__' ); ?>" class="prev"> <?php echo $prev_icon; ?> </a> <?php endif; ?> <?php if ( $next_post ) : ?> <a href="<?php echo get_permalink( $next_post ); ?>" title="<?php __( 'Next Post', '__x__' ); ?>" class="next"> <?php echo $next_icon; ?> </a> <?php endif; ?> </div> <?php }
3] This might not be possible because the arrows points to the next and previous post. When using this in the pages, it may not work because you need to tell the arrows where it should go next.
Hope this helps.
July 21, 2016 at 4:50 pm #1097732Hi,
1. Thank you much I have applied the code you have mentioned. I am able to see the button. (screenshot a1). But link is not enabled. All i can see is “your link here”. I believe I have to do something here. I don’t know much php. By default the link should be the “parent of that portfolio”. I have selected fullwidth page as parent for this. I can hard the parent as link but if in future I may create another set , so at that time it may become a problem. Please let me know how can get parent/upward link here.2. I have applied the code but now the arrows are not coming, though i have selected the same category as that of portfolio. I have two images in the category(screenshot b1), but when I am selecting any image arrows are not coming for this two images (screenshot c1). I have applied the same category for these two portfolio items. May be I didn’t understand the logic. Please explain a bit.
July 21, 2016 at 10:11 pm #1098126Hi there,
1. Try changing this line
<a href="#your-link-here" class="entry-parent" title="Your link title here"><i class="x-icon-th" data-x-icon=""></i></a>
with this one
<a href="<?php echo x_get_parent_portfolio_link() ;?>" class="entry-parent" title="<?php echo x_get_parent_portfolio_title(); ?>"><i class="x-icon-th" data-x-icon=""></i></a>
2. Please change this,
$prev_post = get_adjacent_post( true, '', false ); $next_post = get_adjacent_post( true, '', true );
to this,
$prev_post = get_adjacent_post( true, '', false, 'portfolio-category' ); $next_post = get_adjacent_post( true, '', true, 'portfolio-category' );
Hope this helps.
July 22, 2016 at 12:06 am #1098216Hi Thanks. Second Part is working.
for the first Part. The portfolio is pointing to portfolio layout only.
but actually I have created a full page width parent for it. Because other than portfolio layout other pages don’t have categories so when categories not available it is pointing to itself. IrrespectiveMain link http://www.trivikramwords.com/movies/teenmaar
parent for that is http://www.trivikramwords.com/movies/
but it is pointing to http://www.trivikramwords.com/movies/teenmaar
Only for portfolio categories available. If categories are not available it is pointing to the portfolio itself. Its justing replacing non portfolio parent to ‘”parent” -2’ in the url. in the current scenario I want it to point to http://www.trivikramwords.com/movies/
——-
Another way to look at it is. If one ‘a’ portfolio layout is pointing another portfolio ‘b’ then if ‘b’ can show ‘a’ as thumbnail just as portfolio shows portfolio items as thumbnails, that would be good for me. Please suggest best option for me. because word press galleries are having limitations providing the desired functionality, i am resorting to portfolios.
July 22, 2016 at 1:16 am #1098263Hello There,
For the first part, please edit the code and use this instead:
<a href="http://www.trivikramwords.com/movies/" class="entry-parent" title="Movies"><i class="x-icon-th" data-x-icon=""></i></a>
Hope this helps.
July 22, 2016 at 12:42 pm #1098893So it implies that there is no other option than hard coding.
ok
is the following possible?If ‘aaa’ portfolio layout is pointing another portfolio ‘bbbb’ then if ‘bbb’ can show ‘aaa’ as thumbnail just as portfolio shows portfolio items as thumbnails, that would be good for me. is it doable?
July 22, 2016 at 7:56 pm #1099404Hi there,
It’s doable, but still with hard coding since there are no connections on both portfolios. And you’ll have to create the connection between the two by coding.
Thanks!
July 23, 2016 at 1:24 am #1099613Thank you so much for your support.
July 23, 2016 at 1:57 am #1099638We’re delighted to assist you with this.
Cheers!
-
AuthorPosts