go41

Re: quick question about positioning 3 DIVs horizontally and rollover in Arthemia! :: Reply by Joern

von Joern am 14. Apr. 2012 | Keine Kommentare

first question:

you should create a single-post template for this category ( actually for post in this category "if (in_category(‚our-products-and-services‘))" )
how to do you find here:

http://www.snilesh.com/resources/wordpr … wordpress/

or

http://www.wprecipes.com/how-to-use-dif … r-category

or

http://lorelle.wordpress.com/2005/09/22 … ategories/
I guess you have only one single.php in your theme folder?

in short words, you will use a single.php with just a switch in there to load other templates depending on the category they belong to.
So rename your single.php to single-main.php
make a copy of this single-main.php called single-product.php (to modify later)
create blank single.php with only the switch:

<?php
$post = $wp_query->post;
if ( in_category(‚your-product-category-ID‘) ) {
include(TEMPLATEPATH . ‚/single-product.php‘);
} else {
include(TEMPLATEPATH . ‚/single-main.php‘);
}
?>
now remove in single-product.php the line <?php get_sidebar(); ?> almost at the end of this file.
If that worked, you should see your posts belonging to your products category without a sidebar.

the content here will not stretch to full with however, you have to change

<div id="content"> in single-product.php to something like <div id="content-product">

and add in style.css a new entry. Just take #content and copy that to a new entry #content-product and change the width to width: 920px;
next question I will answer in next post later…
____________________
you find me on Google+, Twitter and Facebook

(von: Joern)

Hier noch 3 weitere Ergebnisse dieses Threads:

quick question about positioning 3 DIVs horizontally and rollover in Arthemia!

14. Apr. 2012 (von: omerkhan01)

My site is here My question is two fold. 1. I want to remove my sidebar on my product pages and just have the container or page text area expand to fill that sidebar area. I don't want it to…

Re: quick question about positioning 3 DIVs horizontally and rollover in Arthemia! :: Reply by Joern

14. Apr. 2012 (von: Joern)

the three boxes:actually left floating div align beside each other, as long the width of them fits on the div around.If you have a space of 900px, 3 boxes with 300px will float left beside each other, the next will…

Re: quick question about positioning 3 DIVs horizontally and rollover in Arthemia! :: Reply by omerkhan01

14. Apr. 2012 (von: omerkhan01)

Yes actually what I did was for the first situation.Created a custom page template and referenced it. WOrks like a charmsee hereI stole the style sheet from another site for formatting and just inputted my own content.I was going to…

Autor:

Du findest mich auch auf Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

weitere forum Beiträge: