s7e7v7e7n7
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [WordPress Popular Posts] how can i use phpthank you Hector.
Forum: Plugins
In reply to: [WordPress Popular Posts] how can i use phpHector so sorry my english not great. You dont understand me.
Juset test document. Yes i know {text_title} printed post title.
I need use some php codes. Like this ;
<?php wpp_get_mostpopular( 'range=monthly&limit=40&thumbnail_width=300&thumbnail_height=200&post_type=post&post_html=" <a href=\'{url}\'> <div class=\'thumbnails\'> <div class=\'wrap2\'> <div class=\'ubar\' style=\'color: #fff;max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\'> {text_title} </div> {thumb_img} <div class="bbar"> <?php $attachment_id = get_post_thumbnail_id(); $image_attributes = wp_get_attachment_image_src( $attachment_id, 'full' );if( $image_attributes ) {?> <?php $width = $image_attributes[1]; $height = $image_attributes[2]; ?> <?php } ?> <?php $fsize = filesize(get_attached_file($attachment_id));$file_size = round($fsize/1024);echo '' . $width. 'x' . $height . ' px';?> / <?php echo getPostViews(get_the_ID());?> hits</div> </div> </div></a>"' ); ?>
(this php codes show image dimensions and etc…)
Now i use php in bbar div.
Im just wondering, can i use php codes in post_html= ?
Forum: Plugins
In reply to: [WordPress Popular Posts] how can i use phpHello Hector,
Thanks for answer.
Actually i want use php codes in this code. Like this; (please look div class=”ubar”)
<?php wpp_get_mostpopular( 'range=monthly&limit=40&thumbnail_width=300&thumbnail_height=200&post_type=post&post_html=" <a href=\'{url}\'> <div class=\'thumbnails\'> <div class=\'wrap2\'> <div class="ubar"><?php $thetitle = $post->post_title; /* or you can use get_the_title() */ $getlength = strlen($thetitle); $thelength = 30; echo substr($thetitle, 0, $thelength); if ($getlength > $thelength) echo "..."; ?></div> {text_title} </div> {thumb_img} </div> </div></a>"' ); ?>
How can work php in this code? This is possible?
Viewing 3 replies - 1 through 3 (of 3 total)