Slidernav is een jQuery plugin dat met behulp van jQuery en CSS een iPhone Stijl Contacten Lijst maakt. Kan vast van pas komen voor je eigen website.
-
Recentste berichten
Advertentie
Categorieën
Recente reacties
Archief
Koppelingenblok
Tags
Slidernav is een jQuery plugin dat met behulp van jQuery en CSS een iPhone Stijl Contacten Lijst maakt. Kan vast van pas komen voor je eigen website.
Related posts can be easily displayed with plugins, but did you ever wonder how you could display related posts with a Thumbnail without using a Plugin? In this article, we will share two different algorithm which you can use to generate related posts with thumbnails and avoid using any plugin.
Note: We will utilize the built-in WordPress Post Thumbnail Function. So it is best if you implement this.
WordPress has this amazing taxonomy known as “Post Tags” which you can use. You can tag each of your posts with multiple keywords. This algorithm would find other posts with any one of the tag that the current post has and will list them.
<?php $orig_post = $post;
global $post;
$tags = wp_get_post_tags($post->ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
‘tag__in’ => $tag_ids,
‘post__not_in’ => array($post->ID),
‘posts_per_page’=>5, // Number of related posts that will be shown.
‘caller_get_posts’=>1
);
$my_query = new wp_query( $args );
if( $my_query->have_posts() ) {echo ‘<div id=”relatedposts”><h3>Related Posts</h3><ul>’;
while( $my_query->have_posts() ) {
$my_query->the_post(); ?><li><div><a href=”<? the_permalink()?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_post_thumbnail(); ?></a></div>
<div>
<h3><a href=”<? the_permalink()?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_title(); ?></a></h3>
<?php the_time(‘M j, Y’) ?>
</div>
</li>
<? }
echo ‘</ul></div>’;
}
}
$post = $orig_post;
wp_reset_query(); ?>
The above code is looking at the current post ID and all tags which are associated with it and it uses the wp_query function to look for all other posts that matches any original tag and display them. You can style the post anyway you want them.
Advantage: Most codes on the web cannot be used within the main post loop. Because the related posts are placed right after the main post and above the comments, this code is very helpful. We are saving the current post ID of the main loop and then recalling it at the end of our related posts code. Usually when you don’t do it this way, the two post ID codes gets mixed up and then the comments start acting weird which can break the comments, other plugins related to comments such as numbering system etc. So this code is good and it works.
Usage: Place this code anywhere you like in your single.php and it will work. But most of the time it is placed right above the comments in the main loop.
This algorithm would find other posts within the same category as the current post, and it will list them as related posts. The advantage of this technique is that you will never have a blank spot for your related posts section.
<?php $orig_post = $post;
global $post;
$categories = get_the_category($post->ID);
if ($categories) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;$args=array(
‘category__in’ => $category_ids,
‘post__not_in’ => array($post->ID),
‘posts_per_page’=> 2, // Number of related posts that will be shown.
‘caller_get_posts’=>1
);$my_query = new wp_query( $args );
if( $my_query->have_posts() ) {
echo ‘<div id=”related_posts”><h3>Related Posts</h3><ul>’;
while( $my_query->have_posts() ) {
$my_query->the_post();?><li><div><a href=”<? the_permalink()?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_post_thumbnail(); ?></a></div>
<div>
<h3><a href=”<? the_permalink()?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_title(); ?></a></h3>
<?php the_time(‘M j, Y’) ?>
</div>
</li>
<?
}
echo ‘</ul></div>’;
}
}
$post = $orig_post;
wp_reset_query(); ?>
This technique utilizes the same functions as the one above except we are just using the different criteria.
If you are creating a new project, or working on a client’s site, this could be very helpful.
Extra inkomen met WordPress blogs is te halen via de integratie van Amazon Widget advertenties en Clickbank affiliate advertenties op een Adsense site.
O juist het tegenovergestelde: Adsense advertentie blokken en Clickbank advertenties op een Amazon site.
Met Adsense sites je automatisch berichten plaatsen met Shopzilla en Clickbank ads.
Met Amazon websites kun je automatisch berichten plaatsen van Amazon product reviews.
Maak een schaduw in een tekst. Voorbeeld:
text-shadow:#000 2px 1px;
Het is lastig om dit op veilige manier te doen.
Een paar links die informatie hierover geven:
http://www.phpfreaks.com/forums/index.php?topic=246534.0
http://ricardocabello.com/blog/post/286
http://stackoverflow.com/questions/467449/when-posting-a-form-with-urlrequest-how-to-include-cookies-from-browser-session
http://blinkdagger.com/flash/creating-high-score-table-in-adobe-flash-cs3/
En op Youtube verschillende videos met de naam “World of Webcraft – Ready Member PHP Session Variables On Your Flash Game Page”.
Hierbij 2 goede links met meer informatie:
http://grilla.co.uk/2011/09/microsoft-translator-and-php/
http://www.viawindowslive.com/Articles/Translator/GetStartedusingtheTranslatorwithPHP.aspx
Microsoft Translator API schijnt een goed alternatief te zijn voor Google Translate. Die zou niet altijd goede resultaten geven.
Android login authenticatie met externe database:
http://webdesignergeeks.com/mobile/android/android-login-authentication-with-remote-db/
Android REST XML implementatie:
http://www.smnirven.com/?p=15
Je kunt je gewone website doorsturen naar een mobiele website als een gebruiker gebruik maakt van een mobiel.
Dit Javascriptje detecteert zowat alle mobiele telefoons. Het is ook mogelijk dit te doen met .htaccess of PHP.
Ik heb gekozen het te doen met Javascript, omdat ik slechts 1 pagina heb willen doorsturen.