Tag Archives: php

Get Custom Taxonomy Terms Using WordPress Archive Template

This tutorial will get the custom taxonomy ID by using get_query_var and get_term_by in archive.php template. The example url is http://http://zourbuth.com/?manufacturers=motorola. Put this code in your theme archive.php: $taxonomy = ‘manufacturers’; $cat_name = get_query_var( $taxonomy ); $term = get_term_by(‘name’, $cat_name, …Read more.

Auto Generated Content Using Search Page and Bing

Open theme search.php and add the following code before get_header(); line: <?php define(‘BING_API_KEY’, ”); function pete_curl_get($url, $params){$post_params = array(); foreach ($params as $key => &$val) { if (is_array($val)) $val = implode(‘,’, $val); $post_params[] = $key.’=’.urlencode($val); } $post_string = implode(‘&’, $post_params); …Read more.

Get Value from Class

<?php class myclass { function myfunction() { /** your code here **/ } } $object = new myfunction(); echo $object->name(); ?>

#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

Having problem like this with socket xampp-phpmyadmin on Windows? #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured) Just open your config.inc.php with path: <code>\xampp\phpMyAdmin</code> at your xampp directory and add the …Read more.

How To Solve The “Headers Already Sent” Problem

You get a warning message on your browser that says: Warning: Cannot modify header information – headers already sent by (output started at… Reason and Solution : It is usually because there are spaces, newlines, or other garbage before an …Read more.