• Resolved Kevin Kwok

    (@queesy)


    Hello! I am trying to display a category title and its description on one continuous line. I found in my functions.php where it generated the category title and description from.

    function gallery_page_title ($content) {
      if (is_category()) {
        $content = '<div class="page-title">';
        $content .= single_cat_title();
    	$content .= category_description();
      }

    Right now with that code it displays like this:

    TITLE
    DESCRIPTION

    BUT i want it to display like:

    TITLE – DESCRIPTION

    But i cant seem to figure out how =( please help if you can, thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Kevin Kwok

    (@queesy)

    any takerS? =\

    Thread Starter Kevin Kwok

    (@queesy)

    I also just tried using this.. but same outcome

    <?php single_cat_title(); ?><?php echo category_description(); ?>

    Thread Starter Kevin Kwok

    (@queesy)

    solved my own question

    <?php
    foreach((get_the_category()) as $category) {
        echo $category->cat_name . ' '$category->description .' ';
    }
    ?>

    hehe….

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post title description on one line’ is closed to new replies.