How to set Media Icons in wordpress theme

Just put some jpg, png or gif files in your theme images folder. In this article we shown to set Media Icons in wordpress theme.

set Media Icons in wordpress theme

  1. your_theme/images/audio.jpg
  2. your_theme/images/audio.gif
  3. your_theme/images/audio.png
  4. your_theme/images/mpeg.jpg
  5. your_theme/images/mpeg.gif
  6. your_theme/images/mpeg.png
  7. your_theme/images/audio_mpeg.jpg
  8. your_theme/images/audio_mpeg.gif
  9. your_theme/images/audio_mpeg.png

Whenever you are putting the media files in post above icons will appear in your theme.

Create breadcrumb in php – PHP Breadcrumb

breadcrumb is useful for every site. here I explained code about Create breadcrumb in php – PHP Breadcrumb. This code will be helpful for website developers.

Create breadcrumb in php – PHP Breadcrumb

What are breadcrumbs?

How to create the breadcrumbs in wordpress
How to create the breadcrumbs in wordpress

Well quite simply, in web page terms this refers to a list of links (usually at the top) that appear on a web page to tell the user where they are in the structure of the website they are viewing. This makes navigating backward and forward so much easier as they have the ability to skip directly back through whole categories, rather than just using the browser’s back button.

Example

The breadcrumbs.php include file:

Copy the code below, save it in a file called breadcrumbs.php and upload it to your site. This will print out a simple unordered list (<ul>) of the parent directories by directory name. The only edits you may wish to make to this file is to change the $ul_id='crumbs'; line if you wish to change the id of the <ul>. If you wish to add a background image or border etc to the <li> simply select it as #crumbs li{} and style. Script for Create breadcrumb in php:

<?
$ul_id='crumbs';
$bc=explode("/",$_SERVER["PHP_SELF"]);
echo '<ul id="'.$ul_id.'"><li><a href="/">Home</a></li>';
while(list($key,$val)=each($bc)){
$dir='';
if($key > 1){
$n=1;
while($n < $key){
$dir.='/'.$bc[$n];
$val=$bc[$n];
$n++;
}
if($key < count($bc)-1) echo '<li><a href="'.$dir.'">'.$val.'</a></li>';
}
}
echo '<li>'.$pagetitle.'</li>';
echo '</ul>';</pre>
?> This is some more usefull code
<pre><?
$url = $_SERVER['REQUEST_URI'];
echo $url;
echo "<br>";
$array = explode("/",$url);
echo $array[2]; ///which folder would you want to access ?
echo "size of array = ".sizeof($array)."<br>";
?>

Use above script for Create breadcrumb in php.

A script to insert in the HTML where you want the breadcrumbs to appear:

Edit the URI to point to where you saved the include file (once this is done it never needs to be changed again). Edit, ‘Insert Page Title’ to add the page title to the end of the breadcrumbs.

<?
$pagetitle="Insert Page Title";
include("http://www.yourdomain.com/breadcrumbs.php");
?>

Note: It would be useful to automatically print the page <title> as the last crumb but PHP cannot interrogate the DOM. Javascript would be required which we didn’t think appropriate as nothing would be returned if Javascript was turned off.

If you are looking for wordpress breadcrumbs then visit this link

wordpress breadcrumbs without any wp plugin