TypeCho adds ICO to the navigation menu through the custom fields of the page

The typecho default theme used by

. You want to add the corresponding icon symbols according to the custom fields of each page in front of the navigation menu

Code:

   

current problem:
is not displayed on the home page, so the custom field of the page cannot be obtained because it is not entered.
after entering the page, all pages will become the same front icon symbol

I can"t PHP. I wrote it while looking up the data.
I feel that there is something wrong with this train of thought. I can"t. I will post a question specially.
think of a stupid way to delete the code of the navigation menu Page_List directly, and write the navigation menu directly to death. But if you add a new page in the background, you need to add the page to herader.php.

I still hope the bosses can give me some ideas. How to write it.

Apr.03,2022

changed a way of thinking, no longer entangled, have achieved what they want.

</i><?php $pages->title(); ?>
<?php else: ?>
    <?php $pages->title(); ?>
<?php endif; ?>
Menu