PDA

View Full Version : سوال: استایل دهی به این کد در php



ali586
یک شنبه 30 آبان 1395, 04:41 صبح
با عرض سلام حدمت اساتیت گرامی
میخواستم درون کد زیر به برچسب ها استایل بدم . لطفا راهنمایی کنید


<?php add_action('wp_ajax_mob_get_series', 'mob_dl_get_series'); add_action('wp_ajax_nopriv_mob_get_series', 'mob_dl_get_series'); function mob_dl_get_series(){ //global $wpdb; $out=''; $cat_term_id=substr($_POST['id'],1,strlen($_POST['id'])-1) ; $categories = get_categories( array( 'orderby' => 'name', 'parent' => $cat_term_id, 'child_of' =>$cat_term_id ) ); foreach ( $categories as $category ) { $out.="<li><a class='item' href='#".$category->term_id ."'>".esc_html( $category->name )."</a></li>"; } echo $out; die(); } add_action('wp_ajax_mob_get_model', 'mob_dl_get_model'); add_action('wp_ajax_nopriv_mob_get_model', 'mob_dl_get_model'); function mob_dl_get_model(){ //global $wpdb; $out=''; $cat_term_id=substr($_POST['id'],1,strlen($_POST['id'])-1) ; $categories = get_categories( array( 'orderby' => 'name', 'parent' => $cat_term_id, 'child_of' =>$cat_term_id ) ); foreach ( $categories as $category ) { $out.="<li><a class='item' href='#".$category->term_id ."'>".esc_html( $category->name )."</a></li>"; } echo $out; die(); } add_action('wp_ajax_mob_get_ver', 'mob_dl_get_ver'); add_action('wp_ajax_nopriv_mob_get_ver', 'mob_dl_get_ver'); function mob_dl_get_ver(){ //global $wpdb; $out=''; $cat_term_id=substr($_POST['id'],1,strlen($_POST['id'])-1) ; $categories = get_categories( array( 'orderby' => 'name', 'child_of' =>$cat_term_id ) ); foreach ( $categories as $category ) { $out.="<li><a class='item' href='#".$category->term_id ."'>".esc_html( $category->name )."</a></li>"; } echo $out; die(); } add_action('wp_ajax_mob_get_ver_des', 'mob_dl_get_ver_des'); add_action('wp_ajax_nopriv_mob_get_ver_des', 'mob_dl_get_ver_des'); function mob_dl_get_ver_des(){ global $post; $out=''; $cat_term_id=substr($_POST['id'],1,strlen($_POST['id'])-1) ; $catPost = get_posts("category=$cat_term_id&posts_per_page=-1"); foreach ( $catPost as $post ) { setup_postdata($post); the_content();
the_tags('<i class="terms" style="margin-right: 10px;" ></i> ');
die(); } die(); } add_action('wp_ajax_mob_get_content_ver', 'mob_dl_get_ver_content'); add_action('wp_ajax_nopriv_mob_get_content_ver', 'mob_dl_get_ver_content'); function mob_dl_get_ver_content(){ //global $wpdb; global $post; $out=''; $cat_term_id=substr($_POST['id'],1,strlen($_POST['id'])-1) ; $catPost = get_posts("category=$cat_term_id&posts_per_page=-1"); foreach ( $catPost as $post ) { setup_postdata($post); $price= get_post_meta(get_the_id(),'_mob_price',TRUE); ?> <form action=" <?php echo get_post_meta(get_the_id(),'_mob_dl_link_file',TRU E); ?>" style="display: block" method="post" id="payment-form"> <table width="100%"> <tr> <input type="hidden" value="<?php the_title(); ?>" name="title" class="title" /> <input type="hidden" value="<?php the_id(); ?>" name="id" /> <input type="hidden" value="<?php if(get_post_meta(get_the_id(),'_mob_size',TRUE)) echo get_post_meta(get_the_id(),'_mob_size',TRUE); ?>" name="size" /> <input type="hidden" value="<?php echo get_post_meta(get_the_id(),'_mob_dl_link_file',TRU E); ?>" name="dllink" /> <input type="hidden" name="cash" value="<?php if(! empty($price)) echo $price;else echo get_option('defprice'); ?>" id="price" /> <td rowspan="1" style="text-align: center; background-color:#f1f817; width:150px;"> <input type="button" name="btn" class="pardakht-btn" value=" پرداخت | دانلود" /> </td> <td rowspan="1" style="text-align: center; background-color: rgb(204, 204, 204); width:130px;"> <span style="color:#000;"><strong> <?php if(! empty($price)) echo $price; else echo get_option('defprice'); ?> تومان</strong></span> </td> <td rowspan="1" style="text-align: center; background-color: rgb(204, 204, 204); width:130px;"> <span style="color:#000;"><strong><?php if(get_post_meta(get_the_id(),'_mob_size',TRUE)) echo get_post_meta(get_the_id(),'_mob_size',TRUE); ?></strong></span> </td><td rowspan="1" style="text-align: center; background-color: rgb(204, 204, 204);width:295px;"> <span style="color:#000;"><strong><?php if(get_post_meta(get_the_id(),'_Build',TRUE)) echo get_post_meta(get_the_id(),'_Build',TRUE); ?></strong></span></td> <td rowspan="1" style="text-align: center; background-color: rgb(204, 204, 204);width:293px;"> <span style="color:#000;"><strong><?php the_title(); ?></strong></span></td> </tr> </table> </form> <?php } die(); }

خط زیر باید استایل دهی بشه که در کد بالا هست.


the_tags('<i class="terms" style="margin-right: 10px;" ></i> ');

با تشکر فراوان

ali586
سه شنبه 02 آذر 1395, 17:11 عصر
هیچ کس نیست راهنمایی کنه ؟