Sunday, July 13, 2014

Before the start of the loop (outside the ring), you

View Posts in with a different style "WordPress forum Persian
Before the start of the loop (outside the ring), you've defined a variable, for example: $ i = 1; Next Khrh ring (the ring) plus a do it: $ i + +; Nvshthhatvn'm going to take that div (in the ring) so this class: class = <? = ($ I% 2 == 0)? 'Alt-post':''?> And in the css class alt-post tone for each character Dashtyn like you've defined.
The <? Php $ i = 1; ?> <? Php $ myqueryname = $ wp_query; $ Wp_query = null; $ Wp_query = new WP_Query (); $ Wp_query-> query ('showposts = 1000'. '& Cat = 6'. '& Offset = 1'. '& Posts_per_page = 250'. '& Paged ='. $ Paged); ?> <? Php if (have_posts ()):?> <? Php while (have_posts ()): the_post (); ?> <tr Id="straw"> <td class = "<? = ($ I% 2 == 0)? 'Alt-post':''?>"> <? Php the_content (__ ('more' )); ?> </ Td> <td class = "<? = ($ I% 2 == 0)? 'Alt-post':''?>"> <? Php the_title fashion job (); ?> </ Td> </ tr> <? Php $ i + +;?> <? Php endwhile;?> <? Php endif;?> And the code of css # straw {background: # FFFFFF; text-align: right; color: # 303b5b; line-height: .1 em; }. Alt-post {background: # F5F5F5; text-align: right; color: # 303b5b; I'll probably never use but thus} spelled wrong place to be. If not bother again to look at the code above, I'm grateful.
"You did not result" means what exactly? The order was wrong? Do you receive an error message? But everything was not shown or can not change the color? Commands in the page source (web page source code) watch to see whether or not assigned to classes?
You mean you did not notice, fashion job I've set myself up for classes. If you mean the link to the css file header that the work done. Manually assign the desired class I Just Want Everything will be displayed. fashion job I'm sure the code style. If more Mmnvntvn'll explain. fashion job :-(
After much putter finally got an answer: D: D. Rings were as follows: <? Php if (have_posts ()):?> <? Php $ i = 1; ?> <? Php $ j = ""; ?> <? Php while (have_posts fashion job ()): the_post (); ?> <? Php $ j = ($ i% 2 == 0)? "Alt-post": "straw"?> <Tr class = "<? Php echo ($ j);?>"> <td> <? php the_content (__ ('more')); ?> </ Td> <td> <? Php the_title (); ?> </ Td> </ tr> <? Php $ i + +;?> <? Php endwhile;?> <? Php endif;?> And commands CSS:. Straw {background: # FFFFFF; text-align: right; color: # 303b5b; line-height: .1 em; }. Alt-post {background: # F5F5F5; text-align: right; fashion job color: # 303b5b; line-height: .1 em; Mercy's guilty} @}, - ~ O)


No comments:

Post a Comment