• Resolved iamjace.m

    (@iamjacem)


    Hi!

    I am working on http://www.thescenestealer.com and I am hoping that you guys can help me remove the sidebar from the portfolio items page.

    I.E. this page has all the items for a certain category but I want to get rid of the description and other details such as copyright information. Also, I want all the items in the portfolio to be centered.

    Please let me know how I can make this possible. I am using a Digifoto theme for your reference.

    Thanks guys!

Viewing 15 replies - 1 through 15 (of 17 total)
  • You can remove copyright on the the theme file or hide it using CSS, Do you want to do that only for that page?

    Thread Starter iamjace.m

    (@iamjacem)

    Hello Ronzcani

    I want to have it applied to all the items/pages in the portfolio. How do I customize the CSS so it will hide the side bar on the right hand side of the screen (description, copyright information)? and have the photos centered on the page (I’m not really well-versed with codes)

    Thanks!

    Try Adding this on Dashboard >> Appearance >> Editor >>style.css to hide the Details and COpyright for Single portfolio items

    body.single-portfolio #content #p-left-wrap {
    display:none;
    }

    Thread Starter iamjace.m

    (@iamjacem)

    It didn’t work on the style.css editor.. but I did see a single-portfolio.php editable link. Would it be a good idea to paste the code there? If so? which part?

    see single-portfolio.php code below

    <?php
    /**
     * The Template for displaying all single portfolio posts.
     */
    
    get_header();
    ?>    
    
    </div> <!--end .wide-top-->
    
    <div class="content-wide">
    
    <div class="shadow-three"></div>
    
    <!--Begin Regular content-->
    <div id="content">
    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <div class="ptitle-outer">
    <div class="inner">
        <div id="ptitle-wrap">
            <h1><?php the_title(); ?></h1>
            </ul>
        </div>
    </div>
    </div>
    
    <div class="post-wrap">
    
    <div id="p-left-wrap">
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["details"][0]) > 0){
      $my_custom_field_details = $custom_fields['details'];
      foreach ( $my_custom_field_details as $key => $value )
      echo "<div class=\"p-left pinner\"><h4>Details:</h4> " . $value ."</div>";
      }
    ?>
    
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["copyright"][0]) > 0){
      $my_custom_field_copyright = $custom_fields['copyright'];
      foreach ( $my_custom_field_copyright as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Copyright:</strong> " . $value ."</div>";
      }
    ?>
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["location"][0]) > 0){
      $my_custom_field_location = $custom_fields['location'];
      foreach ( $my_custom_field_location as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Location:</strong> " . $value ."</div>";
      }
    ?>
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["models"][0]) > 0){
      $my_custom_field_models = $custom_fields['models'];
      foreach ( $my_custom_field_models as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Models:</strong> " . $value ."</div>";
      }
    ?>
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["year_completed"][0]) > 0){
      $my_custom_field_year_completed = $custom_fields['year_completed'];
      foreach ( $my_custom_field_year_completed as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Date:</strong> " . $value ."</div>";
      }
    ?>
    </div>
    
    <div class="col-left col-cl">
    
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    <div class="pinner">
    
    <?php the_content(); ?>
    
    <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( '<span class="pages">Pages:</span>', 'percivale' ), 'after' => '</div>' ) ); ?>
    
    <?php endwhile; // end of the loop. ?>
    
    </div>
    
    </div><!--END POST-->   
    
    </div><!--END COL-LEFT -->   
    
    </div><!-- END POST-WRAP-->
    
    <?php  if (get_option('of_show_port_more') == 'true' ) : // show more portfolio items randomly ?>
    <div class="clear"></div>
    <div class="ptitle-outer">
    <div class="inner">
        <div id="ptitle-wrap">
            <h3><?php if ($mwk = get_option('of_more_work_text')) : ?><?php echo $mwk ?><?php else : ?>More Of My Work<?php endif; ?></h3>
            </ul>
        </div>
    </div>
    </div>
    
    <script type="text/javascript">
    jQuery(document).ready(function($){
    	$('#gs_container_portfolio').gridnav({
    		rows: 1,
    		type: {
    		mode: '<?php if ($geff = get_option('of_gs_slider_eff')) : ?><?php echo $geff ?><?php else : ?>disperse<?php endif; ?>', // use def | fade | seqfade | updown | sequpdown | showhide | disperse | rows
    		speed: <?php if ($gspd = get_option('of_gs_slider_speed')) : ?><?php echo $gspd ?><?php else : ?>400<?php endif; ?>, // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
    		easing: '', // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
    		factor: <?php if ($gfct = get_option('of_gs_factor')) : ?><?php echo $gfct ?><?php else : ?>50<?php endif; ?>, // for seqfade, sequpdown, rows
    		reverse: false // for sequpdown
    		}
    	});
    });
    </script>
    
    <div class="content gs-onerl">
    <div class="gs_container" id="gs_container_portfolio">
    <div class="gs_nav">
    <span class="gs_prev" id="gs_prev">Previous</span>
    <span class="gs_next" id="gs_next">Next</span>
    </div>
    <div class="gs_wrapper">
    <ul class="gs_gallery">
    <?php
    $type = 'portfolio';
    $args=array(
    'post_type' => $type,
    'post_status' => 'publish',
    'orderby' => 'rand',
    'showposts' => '12',
    'caller_get_posts'=> 1,
    );
    $temp = $wp_query;  // assign original query to temp variable for later use
    $wp_query = null;
    $wp_query = new WP_Query();
    $wp_query->query($args);
    ?>
    <?php if ($wp_query->have_posts() ) : ?>
    <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
    <?php
    $thumb = get_post_thumbnail_id();
    $postimage = vt_resize($thumb, '', 284, 190, true );
    ?>
    <li><a href="<?php the_permalink(); ?>" class="landscape"><img title="" alt="" src="<?php echo $postimage[url]; ?>" width="<?php echo $postimage[width]; ?>" height="<?php echo $postimage[height]; ?>"></a></li>
    <?php endwhile; ?>
    <?php endif; ?>
    </ul>
    </div>
    </div>
    </div>
    <?php endif; ?>
    
    <?php get_footer(); ?>

    thanks again

    Don’t you have any Custom css options on your theme? MAybe on the theme options? But if you want to do this here, you can achieve this by adding this after get_header(); ?>

    <style type=”text/css”>
    body.single-portfolio #content #p-left-wrap {
    display:none;
    }
    </style>

    But this not the right way to do this.

    Thread Starter iamjace.m

    (@iamjacem)

    I’m afraid I don’t have the custom CSS option. Well, I want to do it the right way though.

    In the style.css here’s what’s written:

    @import "css/reset.css";
    @import "css/typography.css";
    @import "css/layout.css";
    @import "css/slider.css";
    @import "css/grid-slider.css";
    @import "css/shortcodes.css";
    @import "css/buttons-shortcode.css";
    @import "css/wide-layout.css";

    So what should I be looking for at the theme editor tab?

    Does it work on the single-portfolio.php?

    Thread Starter iamjace.m

    (@iamjacem)

    I haven’t tried it yet. I can’t go through the server as of now. It’s giving me an Internal Server Error (500) so I guess I have to contact my provider so they can check.

    Thread Starter iamjace.m

    (@iamjacem)

    I tried to place the code on the single-portfolio.php editor but it didnt work aswell.

    On single-portflio.php please try to delete this whole code to remove details and copyright

    <div id="p-left-wrap">
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["details"][0]) > 0){
      $my_custom_field_details = $custom_fields['details'];
      foreach ( $my_custom_field_details as $key => $value )
      echo "<div class=\"p-left pinner\"><h4>Details:</h4> " . $value ."</div>";
      }
    ?>
    
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["copyright"][0]) > 0){
      $my_custom_field_copyright = $custom_fields['copyright'];
      foreach ( $my_custom_field_copyright as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Copyright:</strong> " . $value ."</div>";
      }
    ?>
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["location"][0]) > 0){
      $my_custom_field_location = $custom_fields['location'];
      foreach ( $my_custom_field_location as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Location:</strong> " . $value ."</div>";
      }
    ?>
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["models"][0]) > 0){
      $my_custom_field_models = $custom_fields['models'];
      foreach ( $my_custom_field_models as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Models:</strong> " . $value ."</div>";
      }
    ?>
    <?php
      $custom_fields = get_post_custom();
      if (strlen($custom_fields["year_completed"][0]) > 0){
      $my_custom_field_year_completed = $custom_fields['year_completed'];
      foreach ( $my_custom_field_year_completed as $key => $value )
      echo "<div class=\"p-left pinner\"><strong>Date:</strong> " . $value ."</div>";
      }
    ?>
    </div>
    Thread Starter iamjace.m

    (@iamjacem)

    Hi ronzcani, it removed the side bar but it didn’t center the images on the page. I’m hoping to have the portfolio items centered. Would that be possible?

    Thanks for all the help. you’ve been great. I hope you can help me with the alignment as well. šŸ™‚

    You can center it through css. Below is not the right way to do it but it will solve your problem

    Change

    <div class="col-left col-cl">
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

    To

    <div style="margin: 0pt auto; display: block; width: 660px;">
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

    I’m afraid I don’t have the custom CSS option. Well, I want to do it the right way though.

    If you are making changes to your theme files, they will be overwritten and erased when the theme is updated. Modifications should be made using a Child Theme: http://codex.wordpress.org/Child_Themes

    If you are only making CSS changes, you can add custom CSS via a plugin such as JetPack.

    Thread Starter iamjace.m

    (@iamjacem)

    Hey ronzcani that was so incredible! It worked like a charm. I don’t know what happened there but it sure gave me what I wanted achieve. Thanks a lot for your help.

    @wpyogi thanks for the information. I’ll try to learn more of this coding so I can do things the right way but for the time being, I think the site is good.

    Thanks guys. šŸ™‚

    Thread Starter iamjace.m

    (@iamjacem)

    Oh. I noticed that the title wasn’t centered along with the items in the portfolio. If I put <center> on the title i think its on H1, would it work? or is there another way of doing it?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘How to remove sidebar from portfolio items’ is closed to new replies.