Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Help with Marketpress Styling WordPress

  • SOLVED

Currently attempting to add Marketpres to a Pexeto theme, and struggling with making the page read full width.

I've created a custom page template, but I'm not sure why the sidebar is still showing up.

http://www.greenbuttonfarm.com/store/products/

I need this to be a full width page. Can anyone help?

Thanks!

Answers (5)

2012-08-16

Michael Caputo answers:

I can help with that.


Michael Caputo comments:

I ended up having to create a Marketpress theme file for the products page to get this to work.

Marketpress looks like a pretty nice shopping cart plugin.

2012-08-16

Arnav Joy answers:

can you share your custom page templates code?


ohlivia13 comments:

<?php
get_header();

if(have_posts()){
while(have_posts()){
the_post();
$subtitle=get_post_meta($post->ID, 'subtitle_value', true);
$slider=get_post_meta($post->ID, 'slider_value', $single = true);
$layout=get_post_meta($post->ID, 'layout_value', true);
if($layout==''){
$layout='right';
}
$show_title=get_opt('_show_page_title');
$sidebar=get_post_meta($post->ID, 'sidebar_value', $single = true);
if($sidebar=='' || $sidebar=='default'){
$sidebar='page';
}

include(TEMPLATEPATH . '/includes/page-header.php');
?>

<div id="content-container" class="center <?php echo $layoutclass; ?> ">
<div id="<?php echo $content_id; ?>">
<!--content-->
<?php

if($show_title!='off'){?>
<h1 class="page-heading"><?php the_title(); ?></h1><hr/><hr/>
<?php }

the_content();
}
}

?>

</div>
<?php
if($layout!='full'){
print_sidebar($sidebar);
}
?>

</div>
<?php
get_footer();
?>


Arnav Joy comments:

try this

<?php

get_header();



if(have_posts()){

while(have_posts()){

the_post();

$subtitle=get_post_meta($post->ID, 'subtitle_value', true);

$slider=get_post_meta($post->ID, 'slider_value', $single = true);

$layout=get_post_meta($post->ID, 'layout_value', true);

if($layout==''){

$layout='right';

}

$show_title=get_opt('_show_page_title');

$sidebar=get_post_meta($post->ID, 'sidebar_value', $single = true);

if($sidebar=='' || $sidebar=='default'){

$sidebar='page';

}



include(TEMPLATEPATH . '/includes/page-header.php');

?>



<div id="content-container" class="center <?php echo $layoutclass; ?> ">

<div id="<?php echo $content_id; ?>" style="width:100%">

<!--content-->

<?php



if($show_title!='off'){?>

<h1 class="page-heading"><?php the_title(); ?></h1><hr/><hr/>

<?php }



the_content();

}

}



?>



</div>

<?php

if($layout!='full'){

//print_sidebar($sidebar);

}

?>



</div>

<?php

get_footer();

?>


ohlivia13 comments:

Arnav, that didn't seem to work. I'm going to see if Michael can help.


Arnav Joy comments:

try this

<?php

get_header();



if(have_posts()){

while(have_posts()){

the_post();

$subtitle=get_post_meta($post->ID, 'subtitle_value', true);

$slider=get_post_meta($post->ID, 'slider_value', $single = true);

$layout=get_post_meta($post->ID, 'layout_value', true);

if($layout==''){

$layout='right';

}

$show_title=get_opt('_show_page_title');

$sidebar=get_post_meta($post->ID, 'sidebar_value', $single = true);

if($sidebar=='' || $sidebar=='default'){

$sidebar='page';

}



include(TEMPLATEPATH . '/includes/page-header.php');

?>



<div id="content-container" class="center <?php echo $layoutclass; ?> ">

<div id="<?php echo $content_id; ?>" style="width:100%">

<!--content-->

<?php



if($show_title!='off'){?>

<h1 class="page-heading"><?php the_title(); ?></h1><hr/><hr/>

<?php }



the_content();

}

}



?>



</div>

<?php

if($layout!='full'){

//print_sidebar($sidebar);

}

?>



</div>
<script>
jQuery(document).ready(function($){
$('#content').css('width','100%');
$('.sidebar').css('display','none');
});
</script>
<?php

get_footer();

?>


if this does not works then can you please provide me access to your site.

2012-08-16

Abdelhadi Touil answers:

Hi.
Can you post here the code of the custom page template you've created?


Abdelhadi Touil comments:

Try this:
<?php
get_header();
if(have_posts()){
while(have_posts()){
the_post();
$subtitle=get_post_meta($post->ID, 'subtitle_value', true);
$slider=get_post_meta($post->ID, 'slider_value', $single = true);
$layout=get_post_meta($post->ID, 'layout_value', true);
if($layout==''){
$layout='right';
}
$show_title=get_opt('_show_page_title');
$sidebar=get_post_meta($post->ID, 'sidebar_value', $single = true);
if($sidebar=='' || $sidebar=='default'){
$sidebar='page';
}

include(TEMPLATEPATH . '/includes/page-header.php');
?>
<div id="content-container" class="center <?php echo $layoutclass; ?> ">
<div id="<?php echo $content_id; ?>">
<!--content-->
<?php

if($show_title!='off'){?>
<h1 class="page-heading"><?php the_title(); ?></h1>
<hr/><hr/>
<?php }
the_content();
}
}
?>
</div>
</div>
<?php get_footer(); ?>

2012-08-16

Jatin Soni answers:

On your page template find

<div id="content">

You need to change width for this or other thing you can do is write new class something below

.full-width{
width:960px !important
}


and assign to content div like below

<div id="content" class="full-width">

2012-08-16

Budi Kurniawan answers:

Please remove your code on custom template :
<?php get_sidebar(); ?>


and this line if needed on your custom template :
<div class="sidebar"> bla bla bla </div>


and you can change the div style on your custom template :

that rules is :

<div id="content">

Replace with this one :


<div id="full-width">


:)

like this for simple:



<?php get_header();?> << this is call of header script
<div id="full-width"> << this is call of Full Width style
<?php the_content():?> << this is just Example of the content script
<?php get_footer?> << this is call Footer script



and dont you call the function of sidebar :)

Try This , just simple :)


<?php

get_header();



if(have_posts()){

while(have_posts()){

the_post();

$subtitle=get_post_meta($post->ID, 'subtitle_value', true);

$slider=get_post_meta($post->ID, 'slider_value', $single = true);

$layout=get_post_meta($post->ID, 'layout_value', true);

if($layout==''){

$layout='right';

}

$show_title=get_opt('_show_page_title');

$sidebar=get_post_meta($post->ID, 'sidebar_value', $single = true);

if($sidebar=='' || $sidebar=='default'){

$sidebar='page';

}



include(TEMPLATEPATH . '/includes/page-header.php');

?>



<div id="content-container" class="center <?php echo $layoutclass; ?> ">

<div id="full-width">

<!--content-->

<?php



if($show_title!='off'){?>

<h1 class="page-heading"><?php the_title(); ?></h1><hr/><hr/>

<?php }



the_content();

}

}



?>



</div>
</div>

<?php

get_footer();

?>


ohlivia13 comments:

It's the way this template is formatted in this theme that I find confusing. I've removed sidebars easily before, but I can't seem to get it to work with this template. The above does not apply because the template does not look exactly like that. Please see above for the custom code.


Budi Kurniawan comments:

i edit my answer just try :)


ohlivia13 comments:

It hasn't changed anything. Perhaps I've something else set up incorrectly?


Budi Kurniawan comments:

You are not change the :

<div id="<?php echo $content_id; ?>">

with :

<div id="full-width">

and remove this :


<?php



look this Screen shot for your site :)

attached




if($layout!='full'){



//print_sidebar($sidebar);



}



?>







</div>

<script>

jQuery(document).ready(function($){

$('#content').css('width','100%');

$('.sidebar').css('display','none');

});

</script>



because the JQUERY is no neccessary :)