Category: News

How to transfer email accounts and messages between cPanel servers?

Go to etc/ sub folder Download your site domain file Re-upload the your site domain folder to your new server under etc/ Go to the mail/ sub folder Download your site domain file Re-upload the your site domain file to your new server under mail/ All messages and accounts should now appear…

Read More

Updating Host file on a Mac

If you would like a web address to just point to your local development environment. You will need to edit your local host file. Go to the file and open using a text editor Macintosh HD/private/etc/host Add the iP of your machine followed by the required local address 101.1.1.33 sky-zilla.dev…

Read More

Function Reference/get permalink

Use this to add a permalink to the post. <?php echo get_permalink(); ?>

Read More

Get featured image thumbnail as image or URL

the following code will return a featured image with <img> tags in a medium size. the_post_thumbnail(‘medium’); the following code will give you the URL of the featured image thumbnail (small) only. $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); if you want to get the medium size thumbnail using the same code use:…

Read More

explode()

Explode is used to separate a string of text or values that are differentiated by a marker such as a space or a symbol. example: $pizza  =  “piece1 piece2 piece3 piece4 piece5 piece6″; $pieces =  explode(” “, $pizza); echo $pieces[0]; // piece1 echo $pieces[1]; // piece2  

Read More

Trim text using wp_trim_words( )

User the following to trim display text. The following example is using a text field. wp_trim_words( get_field(‘intro_text’), 20 );

Read More

Identifying template name in functions.php file

Main reason for using this function is to load .js scripts only on pages required via the functions.php page.

Read More

Edit gift vocher email

To edit the gift voucher emails the following files in OpenCart need to be edited. admin/language/english/mail/voucher.php (Language file) admin/view/template/mail/voucher.tpl (template file)  

Read More

Meta Tags Every website should have

General meta tags <title>Up to 70 Characters of Keyword-relevant text here</title> <meta name=”description” content=”Approximately 140 words or less of text about your company”> Google specific meta tag <link rel=”author” href=”link to your google+ account“/> Facebook meta tag: Title tag <meta property=”og:title” content=”Title of your blog”/> Property tag <meta property=”og:type” content=”article”/>…

Read More