how can I remove widgets from a about page so that it can be full width page?
how to remove widgets from specific page?
8 posts from 4 voices-
Posted 2 years ago #
-
I think the best way to do this is to duplicate the file called page.php and call it template_about.php. Then you need to change the line that says this:
<div class='box box_medium box1'>
to
<div class='box box_big box1'>You also should remove this line:
<?php get_sidebar(); ?>Then open up style.css and add the following at the end
.big_box > .entry { width: auto !important; }Finally, you just have to go to the About Page in the Admin Panel and change the template (on the right) to the About template. I'm not 100% on these so let me know if you have any trouble.
Posted 2 years ago # -
For some reason i can't see it in my admin panel when i go to pages->add new->page attributes->template->?i cant see template-about or template??
please help!
Posted 2 years ago # -
You need to follow the instructions above first: Please DUPLICATE page.php and call it template_about.php. Then you make the modfications Noah posted above. Afterwards (last step) go to your page editor - on the right sidebar you can choose which template you want to use for this page.
Posted 2 years ago # -
yes I am but it's not showing
look
<?php /* Template Name: My template */ global $k_options; if ($post->ID == $k_options['contact']['contact_page']) $contactpage = true; if ($post->ID == $k_options['blog']['blog_page']) $blogpage = true; if(isset($k_options['portfolio']['matrix_slider_port_final']) && $k_options['portfolio']['matrix_slider_port_final'] != ''){ foreach($k_options['portfolio']['matrix_slider_port_final'] as $key => $value) { if ($post->ID == $key) { $portfoliopage = true; } } } if($contactpage) { include(TEMPLATEPATH."/template_contact.php"); } else if($blogpage) { include(TEMPLATEPATH."/template_blog.php"); } else if($portfoliopage) { include(TEMPLATEPATH."/template_portfolio.php"); }else{ get_header(); $teaser = get_post_meta($post->ID, "teaser", true); if($teaser != ""){ ?> <div class="additional_info"> <h2><?php echo $teaser; ?></h2> </div> <?php } ?> <div id="main"> <div class="wrapper"> <div class='box box_big box1'> <?php if (have_posts()) : while (have_posts()) : the_post(); $width = '600'; $lightbox = array('',''); $frontpage_image = get_post_meta($post->ID, "frontpage-image", true); if($frontpage_image != "") $size = @getimagesize($frontpage_image); if($frontpage_image != "" && ($size[0] > $width || !isset($size[0])) ) { $lightbox[0] ='<a href="'.$frontpage_image.'" rel="lightbox" title="">'; $lightbox[1] ='</a>'; if($k_options['general']['tim'] == 1){ $resizepath = get_bloginfo('template_url')."/timthumb.php?src="; #timthumb path $resize_options1 = "&w=$width&h=$height&zc=1"; $frontpage_image = $resizepath.$frontpage_image.$resize_options1; } } ?> <div class='entry'> <h2><a>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php if($frontpage_image != "") echo $lightbox[0].'<img src="'.$frontpage_image.'" alt="" />'.$lightbox[1]; the_content(); ?> </div> <!--end entry--> <?php endwhile; endif; ?> </div> <!--end box_medium--> </div><!--end wrapper--> <?php get_footer(); } ?>Posted 2 years ago # -
I corrected your code. Please copy it in your php file. A template called "My Template" should now appear in your page editor.
Posted 2 years ago # -
YOU ARE THE BEST!!!!!! now how can make my page 914px? and not 600px.
Posted 2 years ago # -
Hey,
I have added fullwidth classes to your code and adjusted the image width to full width here:
<?php /* Template Name: My template */ global $k_options; if ($post->ID == $k_options['contact']['contact_page']) $contactpage = true; if ($post->ID == $k_options['blog']['blog_page']) $blogpage = true; if(isset($k_options['portfolio']['matrix_slider_port_final']) && $k_options['portfolio']['matrix_slider_port_final'] != ''){ foreach($k_options['portfolio']['matrix_slider_port_final'] as $key => $value) { if ($post->ID == $key) { $portfoliopage = true; } } } if($contactpage) { include(TEMPLATEPATH."/template_contact.php"); } else if($blogpage) { include(TEMPLATEPATH."/template_blog.php"); } else if($portfoliopage) { include(TEMPLATEPATH."/template_portfolio.php"); }else{ get_header(); $teaser = get_post_meta($post->ID, "teaser", true); if($teaser != ""){ ?> <div class="additional_info"> <h2><?php echo $teaser; ?></h2> </div> <?php } ?> <div id="main"> <div class="wrapper fullwidth"> <div class='box box_big box1'> <?php if (have_posts()) : while (have_posts()) : the_post(); $width = '940'; $lightbox = array('',''); $frontpage_image = get_post_meta($post->ID, "frontpage-image", true); if($frontpage_image != "") $size = @getimagesize($frontpage_image); if($frontpage_image != "" && ($size[0] > $width || !isset($size[0])) ) { $lightbox[0] ='<a href="'.$frontpage_image.'" rel="lightbox" title="">'; $lightbox[1] ='</a>'; if($k_options['general']['tim'] == 1){ $resizepath = get_bloginfo('template_url')."/timthumb.php?src="; #timthumb path $resize_options1 = "&w=$width&h=$height&zc=1"; $frontpage_image = $resizepath.$frontpage_image.$resize_options1; } } ?> <div class='entry'> <h2><a>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php if($frontpage_image != "") echo $lightbox[0].'<img src="'.$frontpage_image.'" alt="" />'.$lightbox[1]; the_content(); ?> </div> <!--end entry--> <?php endwhile; endif; ?> </div> <!--end box_medium--> </div><!--end wrapper--> <?php get_footer(); } ?>Copy the code to your php file. Next, add this CSS to the end of style.css:
.fullwidth .box { border-right: none; margin: 5px 0 0; padding: 0; } .fullwidth .box_medium, .fullwidth .entry { width: 940px; }The widths are 940px not 914px because I have removed the margin and padding to the right of the content as well as the 1px border.
Let me know how you get on :)
James
Posted 2 years ago #
Reply
You must log in to post.














