echo 'archives : ' . single_cat_title(); displays wrong output

scottiescotsman

My PHP code is giving the wrong output I require.

<h4>
<?php        
    if ( is_category() ) {
        echo 'archives : ' . single_cat_title();
    } elseif ( is_tag() ) {
        echo single_tag_title() . ' : archives';
    } elseif ( is_author() ) {
        the_post();
        echo 'Author archives : ' . get_the_author();
        rewind_posts();
    } elseif ( is_day() ) {
        echo 'Daily archives : ' . get_the_date();
    } elseif ( is_month() ) {
        echo 'Monthly archives : ' . get_the_date('F Y');
    } elseif ( is_year() ) {
        echo 'Yearly archives : ' . get_the_date('Y');
    } else {
        echo 'Archives:';
    }
?>
</h4>

Gives out business archives :, but desire it to be archives : business.

How do I fix this, please

Thanks Steven

scottiescotsman
single_cat_title('archive : ');

I found my answer, thanks for your help.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

echo $PATH in system() give me a wrong output

From Dev

bash script:echo output garbled and in wrong order

From Dev

Piping echo, tail and sed leads to wrong output

From Dev

echo command displays to the screen even though loop directs to output file

From Dev

echo command displays to the screen even though loop directs to output file

From Dev

Printing the word echo in the output of cat file

From Dev

UIPopoverController displays at wrong position

From Dev

Extended displays with wrong proportions

From Dev

UIScrollView displays wrong location

From Dev

UIPageViewController displays wrong data

From Dev

Window background image displays with an echo

From Dev

JSON value not returning, but displays on echo

From Dev

Output from ls has newlines but displays on a single line. Why?

From Dev

wrong echo command

From Dev

Why is there a "/dev/fd/63" in the output of "echo 123 >(cat)"?

From Java

img tag displays wrong orientation

From Dev

ComboBox displays a list of string wrong

From Dev

f:convertDateTime displays wrong Year

From Dev

Datagrid displays data in wrong rows

From Dev

Android - GregorianCalendar displays wrong month

From Dev

JTable RowFilter displays wrong rows

From Dev

echo mysql select statement with wpdb displays NO RESULTS

From Dev

What is wrong with “echo $(stuff)” or “echo `stuff`”?

From Dev

Why does it displays a None in the Output

From Dev

Unable to change the echo output

From Dev

echo newline character output

From Dev

Echo Output on the Same line

From Dev

Order php echo output

From Dev

Echo Output on the Same line