예제 #1
0
function aa_seometa_add_meta()
{
    global $post, $item, $aa_category;
    $page_id = get_option('dbaa_items_page');
    if ($post->ID == $page_id && $page_id != 0) {
        if (is_object($item) && !empty($item->item_title)) {
            $content = AA_Item::output_single($item->item_id, get_option('dbaa_item_page_meta_desc_format'));
        } elseif (is_object($aa_category) && !empty($aa_category->category_englishname)) {
            $content = 'Produkte zur Kategorie ' . $aa_category->category_germanname;
        } elseif (!empty($_REQUEST['item_categories'])) {
            $content = get_option('dbaa_categories_list_title');
        } else {
            $content = get_option('dbaa_items_page_title');
        }
        ?>
        <meta name="description" content="<?php 
        echo $content;
        ?>
"/>
    <?php 
    }
}