Enjoy the free book:
Wordpress & Ajax
Web Issues
how to get category name by post-id?
if you want get name category with post_ID, you can use function: wp_get_post_categorie
<?
$post_categories = wp_get_post_categories($post->post_id);
$cats = array();
foreach($post_categories as $c){
$cats_r = get_category( $c );
echo $cats_r->name;
}
?>
good luck!
<?
$post_categories = wp_get_post_categories($post->post_id);
$cats = array();
foreach($post_categories as $c){
$cats_r = get_category( $c );
echo $cats_r->name;
}
?>
good luck!
PHP strip_tags() Function
Tips and Notes
Note: HTML comments are always stripped. This cannot be changed with the allow parameter.Example 1
<?php echo strip_tags("Hello <b>world!</b>"); ?> |
Hello world! |
Example 2
<?php echo strip_tags("Hello <b><i>world!</i></b>","<b>"); ?> |
Hello world!
Power comment plusgin: paginate , ajax, and more
Why didn't embed font style work on IE? How to fix
Why didn't embed font style work on IE? How to fix this isues?
@font-face {
font-family: MyCustomFont;
src: url("Aspire-DemiBold.ttf") /* TTF file for CSS3 browsers */
}
Embed font not work with IE
@font-face {
font-family: MyCustomFont;
src: url("Aspire-DemiBold.ttf") /* TTF file for CSS3 browsers */
}
How to show videos on lightbox
The WordPress Video Lightbox plugin allows you to embed videos on a page using lightbox overlay display similar to the one shown below. This plugin can be used to display images, flash, YouTube, Vimeo, iFrame etc in a lightbox overlay. The embedded videos can be viewed on iPhone and iPad too. The plugin uses the PrettyPhoto JQuery Library.
How to check current page is home/frontpage in joomla 1.5.23
On website joomla 1.5.23, we only want to show something on homepage but not showing on other pages. What code, and how to solve this problem? Below is a way that I want to show to you:
Source Code
<?
$menuitem = & JSite::getMenu();
if ($menuitem->getActive()->name == "Home" && $_GET[page]=="")
{
echo "Boldownload.com hello the world";
}else
{
//not homepage
}
?>
$menuitem = & JSite::getMenu();
if ($menuitem->getActive()->name == "Home" && $_GET[page]=="")
{
echo "Boldownload.com hello the world";
}else
{
//not homepage
}
?>
Subscribe to:
Posts (Atom)