X-cart V4.7.1 SEO on Customized URLs

If your x-cart based shoping system has thousands of products or many categories, and you need to add a customized word at the end of a detailed product or category url, for example:
Your category name is: Cheap Glasses, default x-cart seo function will generate: Cheap-Glasses;
your product name is: USA, defautl x-cart seo function will generate: USA. (more…)

Posted in Php Skills, X-Cart. Comments Off on X-cart V4.7.1 SEO on Customized URLs »

Get first letter of each word


< ?php //get first letter of each word //method a $words = explode(" ", "Cheap prescription eyeglasses"); $acronym = ""; foreach ($words as $w) { $acronym .= $w[0]; } echo $acronym; (more…)

Posted in Php Code, Php Skills. Comments Off on Get first letter of each word »

How to remove the title attribute using dreamweaver?

Here are some html code:

<A title=”mens glasses” href=”http://www.cheapglasses123.com/men-glasses”>Men’s Glasses</A>
<A title=”womens glasses” href=”http://www.cheapglasses123.com/women-glasses”>Women’s Glasses</A>
<A title=”kids glasses” href=”http://www.cheapglasses123.com/kids-glasses”>Kids Glasses</A>

If we do not need title attribute in these href code, and let them be: (more…)

Posted in Php Skills. Comments Off on How to remove the title attribute using dreamweaver? »

How to Get URL of Current WordPress Page or Post?

We often need to know how to get url of current wordpress page or post if we re-programming wordpress. Here I will share 2 methods with you. One is via PHP code, and the other is using wordpress function.

First, let me intruduce how to use PHP to achieve our demands. We can add the code to suitable pages, say footer.php. Go to your wordpress template, and edit footer.php. Here we use http://kingphp.com/15.html as an example. (more…)

Posted in Php Skills, WordPress. Comments Off on How to Get URL of Current WordPress Page or Post? »

Skills on How to Show different Adsense Ads at WordPress

More and more people love to use wordpress to setup blogs and place adsense ads, and many people still love the use the theme of Classic, by Dave Shea. Can we show different adsense code at the same place, but different pages then? For example, we want to show 2 adsense block at the main body of detailed pages, but only show 1 adsense block at other page’s main body.
(more…)

Posted in Php Code, Php Skills, Php Study, WordPress. Comments Off on Skills on How to Show different Adsense Ads at WordPress »

explode and foreach to show strings or ASCII

//transfer ASCII to string

$string = “78b101b116b87b105b110b100”;
$tags = explode(‘b’, $string); 
foreach($tags as $key) { echo chr($key);  }
//transfer string toASCII
echo “<br><br>”;
$string = “Tiger Young”;
foreach($tags as $key) { echo ord($key).”b”;  }
echo “<br><br>”;

Posted in Php Functions, Php Skills. Comments Off on explode and foreach to show strings or ASCII »

How to let 2 domains show the same contents in Hostgator Hosting?

Sometimes we want to 2 domains show the same contents in Hostgator Web Hosting, and show different domain. For example, we want to let www.cheapglasses123.com, and www.bestpriceglasses.org show the same contents, but use differnt domains also. We can do like this when we Addon Domains to Hostgator Cpanel. (more…)

Posted in Php Skills, Web Hosting. Comments Off on How to let 2 domains show the same contents in Hostgator Hosting? »

2 Methods to show wordpress lastest posts at other site

Method one, we can show other wordpress posts at our site by using  simplepie.inc, download a wordpress plugin, named “simplepie-core”, and upload simplepie.inc to your site root, you can rename simplepie.inc to other name also, ie, eyeglassframes.inc.

Then add the following code at your own site .php file. (more…)

Posted in Php Code, Php Skills, WordPress. Comments Off on 2 Methods to show wordpress lastest posts at other site »

Add one adsens ads except homepage.

It is very simple, copy the following code, and change YOU ADSENSE ADS CODE HERE. to your ads code. done!

 <div class=”storycontent”>

<?php if (($wp_query->current_post == 0)and (!is_home())) : ?>
<div style=”float:right”><br>
YOU ADSENSE ADS CODE HERE.
</div>
<?php endif; $postcnt++; ?>
  <?php the_content(__(‘(more KINGPHP details…)’)); ?>
 </div>

Posted in Php Skills, WordPress. Comments Off on Add one adsens ads except homepage. »

Show post titles at category, and show your own words at homepage.

<?php get_header(); ?>

<?php if (is_home())

echo ”
Welcome, add your own words here!

“; ?>

<?php if (!is_home())

{ ?>
<ul>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li>
<a href=”<?php echo get_permalink()?>”><?php the_title(); ?></a>
</li>
<?php endwhile; endif; ?>
<ul>

<?php }  ?>

<?php get_footer(); ?>

Posted in Php Skills, WordPress. Comments Off on Show post titles at category, and show your own words at homepage. »
12
King Php Science Welcome, you are from: 54.205.172.57