cloudstr210
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Get the featured image using post_thumbnail_htmlGot this code on the net and added it to my functions.php
add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 ); function my_post_image_html( $html, $post_id, $post_image_id ) { $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>'; return $html; };
then to use it, use this code:
<?php echo the_post_thumbnail('thumbnail'); ?>
If you have a better suggestion please reply.
Thanks!
Forum: Plugins
In reply to: [GIF Animation Preview] How to use this on featured imageThis is how my theme shows the thumbnail of the post in the homepage.
if( has_post_thumbnail() ) { ?> <?php $featuredImage = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> <img src="<?php echo $featuredImage; ?>" alt="<?php echo the_title(); ?>" /> <div class="entry-overlay"><span class="icon-fullscreen"></span></div>
Forum: Plugins
In reply to: [WP Custom Fields Search] not compatible with WP 3.8 ?it still working for me..
Thanks! It works.. Sorry.. Im noob on php..
Thanks again.. Nice plugin btw,
Forum: Fixing WordPress
In reply to: Checking if the User is AdminThank you.. Problem solved!
Forum: Fixing WordPress
In reply to: Checking if the User is AdminYup, I need to check if the current user is admin..
Do i need to put <?php?
could you give me sample with adsense dummy code on it.. thanks!
Forum: Fixing WordPress
In reply to: Checking if the User is AdminI tried this too..
<?php if (!is_admin()) { ?>
echo ‘<?php include(‘adsense.php’); ?>’;
<?php } ?>But it seem that the function !is_admin is not working?
Forum: Fixing WordPress
In reply to: Checking if the User is AdminIts the last code of the adsense code.
Thanks for the reply.. I know theres nothing wrong in it but its not working for me..
Forum: Fixing WordPress
In reply to: Checking if the User is AdminI tried this code.. and have no error, but the adsense is still showing even the admin is login..
<?php if (!is_admin()) { ?> <?php include('adsense.php'); ?> <?php } ?>
Forum: Fixing WordPress
In reply to: Checking if the User is AdminDoes not work too.. This is the error
Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/xxx/public_html/xxxx/wp-content/themes/xxx/single.php on line 6
Forum: Fixing WordPress
In reply to: Get Image on Post Using Custom Fieldssorry.. forgot to use code block:
the code again..
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/includes/timthumb.php?src=<?php get_thumbnail($post->ID, 'full'); ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
Forum: Fixing WordPress
In reply to: Facebook like page is too small..thank you now it works!
Forum: Fixing WordPress
In reply to: Facebook like page is too small..here is the sample..
https://thesisworks.com/2011/information-technology-thesis/faculty-loading-introduction/
just go below the post..
Forum: Fixing WordPress
In reply to: Facebook like page is too small..This is the code.. I wonder why it is too small..
<iframe src="https://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FTHESISWORKS%2F142584239164763%3F&width=185&colorscheme=light&show_faces=true&border_color&stream=false&header=true&height=290" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:185px; height:290px;" allowTransparency="true"></iframe>
Forum: Fixing WordPress
In reply to: Facebook like page is too small..Up please.