Tagged: x
-
AuthorPosts
-
June 18, 2016 at 8:32 am #1048464
tashitendrelParticipantHello,
I will need to add an additional content to portfolio-item sidebar. I will be using Launch Project Button for external links, but I need a second similar button like this. Now I have found those 2 treads explaining how to add extra content to that sidebar:
https://community.theme.co/forums/topic/editing-content-for-portfolio-entry-extra-section/
https://community.theme.co/forums/topic/portfolio-right-side-customization/Looks the both ways could help me to atchieve what I need to do (I guess in text area it would be ok to place a button shortcode?), but I would like to confirm that one of them could work with Renew stack. I have Child theme.
thank you
June 18, 2016 at 8:46 pm #1048863
Rue NelModeratorHello There,
Thanks for writing in!
Since you have your child theme active and ready, 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/RENEW/CONTENT-PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Portfolio post output for Renew. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( ! x_is_portfolio_item() ) : ?> <div class="entry-featured"> <?php x_portfolio_item_featured_content(); ?> <div class="entry-cover"> <div class="entry-cover-content"> <span><?php echo get_post_meta( get_the_ID(), '_x_portfolio_media', true ); ?></span> <h2 class="entry-title entry-title-portfolio"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a> </h2> <span><?php echo get_the_date( 'm.d.y' ); ?></span> </div> </div> </div> <?php endif; ?> <div class="entry-wrap cf"> <?php if ( is_singular() ) : ?> <div class="entry-info"> <div class="entry-featured"> <?php x_featured_portfolio( 'cropped' ); ?> </div> <header class="entry-header"> <h1 class="entry-title entry-title-portfolio"><?php the_title(); ?></h1> <?php x_renew_entry_meta(); ?> </header> <?php x_get_view( 'global', '_content', 'the-content' ); ?> </div> <div class="entry-extra"> <?php x_portfolio_item_tags(); ?> <?php x_portfolio_item_project_link(); ?> <?php // place your button here ?> <?php x_portfolio_item_social(); ?> </div> <?php endif; ?> </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/renew/Hope this helps.
June 19, 2016 at 7:56 am #1049195
tashitendrelParticipantHi,
unfortunatelly, it doesnt help. It actually destroyed my portfolio! Even after removing that file from the folder, the portfolio-item looks like on the screenshot. And the whole portfolio similar! What to do now?
Thankfull I have backup, but what should I replace from backup, since added and then deleted one file??Now, when I looked into that file, it doesnt look good. I am attaching it as well. I’m scared that I destroyed my portfolio here. Please help.
June 19, 2016 at 8:08 am #1049201
tashitendrelParticipantThis reply has been marked as private.June 19, 2016 at 8:21 am #1049208
tashitendrelParticipantUff, I deleted it properly this time and portfolio is back! But the code clearly doesnt work. It would be great if you could suggest some other solution.
June 19, 2016 at 11:45 am #1049371
RupokMemberHi there,
Thanks for writing back. The code seems fine and should work if you add them correctly. Maybe we didn’t understand your issue better. Would you clarify a bit that what you actually trying to achieve?
Meantime make sure to add the code under /wp-content/themes/x-child/framework/views/renew/content-portfolio.php
Cheers!
June 19, 2016 at 9:44 pm #1049905
tashitendrelParticipantHi,
Sorry, if I was unclear, but the aim is to add an additional button to that sidebar. Now, I have followed the instructions given here: https://community.theme.co/forums/topic/adding-text-to-the-portfolio-sidebar/
and to do it first I have copied portfolio-content.php file from x theme.
This way I have an Additional Info text editor at the bottom of Portfolio Item admin. And it works. I have added my button there and I’m happy that I could add any other extra content in the future.
thank youJune 20, 2016 at 12:38 am #1050017
Rue NelModeratorHello There,
We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!Best Regards.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1048464 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
