Hello everyone, googled for quite a long time, before asking, in general, the essence of the question: something like a product catalog is created on Wordpress, one product is a record, when opening this record it is necessary that the content be located according to the layout as on the screen, but there’s only, in the recording I indicated a thumbnail, and I wrote text and pictures in the content, how now the whole thing can be arranged according to the layout? enter image description here

<div class="item_description"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if ( in_category('3') ) { ?> <div class="post-cat-three"> <?php } else { ?> <div class="post"> <?php } ?> <h4><?php the_title(); ?></h4> <div class="entry"> <?php the_content(); ?> </div> </div> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> 
  • Put Woocommerce - pepel_xD
  • I initially did not indulge in plugins, so everything is done without them. - Webear
  • Code add to the body of the question - eugene_v
  • @eugene_v ready - Webear
  • I understand the cycle. You took from this example codex.wordpress.org/%D0%A6%D0%B8%D0%BA%D0%BB_WordPress because use category id check - eugene_v

2 answers 2

If you can’t even write your own plugins, then only manually make up every page.

If with plugins, then it will suit you:

acf - custom fields for records. With it, you will create your right block with the characteristics, and it will be very easy to type out.

For a slider in this case, an example can come up from here: link

You impose everything once, and you greatly facilitate your work on adding content.

  • In general, the whole ACF solved all my problems))) I set the fields for the text and the fields for the pictures, then in the body of the cycle I brought out the links for the carousel I needed, and it all worked!) - Webear

Nothing good can be said here, judging by the code you output everything in the content body, respectively, you will need to adjust each post to your own format, sometime you will get bored and you will redo everything. At the moment, you need to prescribe the DIV blocks with customized classes and styles in the content. When you make 1 post, then you will transfer the body to another and change only the contents, but this is such a "crutch" ...

Why you did not display the main image miniature?

 if ( has_post_thumbnail() ) { the_post_thumbnail(); } the_content(); 
  • The main image should change when you click on the list of pictures down, the script is there, but here's how to set everything up .... I'll try the answer option below to connect the slider. - Webear
  • Then yes. You will need to use one of the carousel or slider scripts. In the matter of this is not specified - eugene_v Nov.