rss

About Me

My Photo
irnanto dwi saputra
View my complete profile

12 November 2012

How To Create a Sitemap in Wordpress

Sitemap is a page that shows the parts or links contained on the site. Sitemap devoted to two things for search engines and for the user (human). This time I will give a little tutorial on how to create a sitemap in wordpress for user. Here I am using a CMS wordpress hosting service that has the facility to use a PHP file. OK we just practice how to create a sitemap in wordpress.
The steps that you should follow the following :
  1. Login to cpanel your website
  2. Open the file manager
  3. Go to the directory of your website template is being actively used
    example: public_html / wp-content / themes / name-theme
  4. Create a new file with the name sitemap.php
  5. Copy or type the code below in file sitemap.php
    <?php
    /*
    Template Name: Sitemap
    */
    ?>
    <?php get_header(); ?>

    <div id="content" >
      <div class="post">
        <div class="title">
          <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
            <?php the_title(); ?>
    <!-- ----------------- Display Post with its relative category ----------------- -->
            </a></h2>
        </div>
        <div class="entry siteMap">
          <h2 id="posts">Posts</h2>
          <ul>
            <?php
    // Add categories seprated with comma (,) you'd like to hide to display on sitemap
    $cats = get_categories('exclude=');
    foreach ($cats as $cat) {
      echo "<li><h3>".$cat->cat_name."</h3>";
      echo "<ul>";
      query_posts('posts_per_page=-1&cat='.$cat->cat_ID);
      while(have_posts()) {
        the_post();
        $category = get_the_category();
      
        for($xi=0;$xi<=5;$xi++){
        if ($category[$xi]->cat_ID == $cat->cat_ID) {
          echo '<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>';
        }
        }
      }
      echo "</ul>";
      echo "</li>";
    }
    ?>
          </ul>
    <!-- ----------------- Display Categories ----------------- -->
          <h2>Categories</h2>
          <ul>
            <?php wp_list_cats("sort_column=name&feed_image=/wp-content/themes/wizer/images/rss-ball.jpg&optioncount=1&hierarchical=0"); ?>
          </ul>
    <!-- ----------------- Display Pages ----------------- -->
          <h2 id="pages">Pages</h2>
          <ul>
            <?php
    // Add pages seprated with comma[,] that you'd like to hide to display on sitemap
    wp_list_pages(
      array(
        'exclude' => '',
        'title_li' => '',
      )
    );
    ?>
          </ul>
        </div>
      </div>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  6. Save file sitemap.php
  7. Login to your-domain/wp-admin
  8. Click the page menu
  9. Select add new
  10. Type the title "Sitemap" without quotes
  11. On the Page Attributes -> Template
    How To Create a Sitemap in Wordpress
  12. Select sitemap
  13. Click Publish
Now look at the results in your web menus. For demo please visit this website.
Read more.....

09 November 2012

break out frame traffic exchange

How to remove frame exchange traffic without breaking the rules.

Many ways to bring in traffic, one of which is a traffic exchange program. But there are things to be the rule that traffic exchange to exchange traffic, we have to do web surfing traffic exchange sites so that we get the points that will be used as a tool to get some traffic.

Web or a link that we list will appear when surfing. Web will be appearing in a frame that has the minimum timer to continue surfing. to remove the frame without having to break the rules is by mengilangkan frame after the timer runs out.
below scrip to break out the frame

<script language="JavaScript" type="text/javascript"> 
if (top.location != self.location) top.location = self.location;
</script>

scripts on the web eliminates the frame after loading. To remove the frame according Timmer specified, are listed below

<script language="JavaScript" type="text/javascript"> 
if (top.location != self.location) setTimeout(function(){top.location = self.location;},10000); 
</script>

Place the above script code  </head>

Numbers indicate the length of time 10.000 to remove the frame for 10 seconds. Please you change the timer to your liking.

Read more.....
 

Site Info

Google Pagerank Powered by  MyPagerank.Net My Ping in TotalPing.com TopOfBlogs My Zimbio Blog Directory