WordPress.org

Forums

Pinboard
Preserve changes to functions.php across upgrades (1 post)

  1. Southwest
    Member
    Posted 1 year ago #

    I'm using Pinboard 1.1.0.

    I made some edits to the theme's functions.php in order to display FontAwesome icons before archive titles. For instance, if you're browsing the "foo" tag, then up in the header, where it reads "Currently browsing tag fall", there's a tag icon to the left of "fall". These are the changes I made; they're in the "Highlight current location in the archive" section of functions.php, around line 1306:

    elseif( is_author() ) {
    					$author = get_userdata( get_query_var( 'author' ) );
    					echo '<i class="icon-user"></i> ' . $author->display_name;
    				} elseif ( is_year() ) {
    					echo '<i class="icon-calendar"></i> ' . get_query_var( 'year' );
    				} elseif ( is_month() ) {
    					echo '<i class="icon-calendar"></i> ' . get_the_time( 'F Y' );
    				} elseif ( is_day() ) {
    					echo '<i class="icon-calendar"></i> ' . get_the_time( 'F j, Y' );
    				} elseif ( is_category() ) {
    					single_term_title( '<i class="icon-bookmark"></i> ' );
    				} else {
    					single_term_title( '<i class="icon-tag"></i> ' );
    				}

    You can see that I'm echoing <i></i> elements with certain classes.

    I want to preserve these changes between upgrades of Pinboard, but as it stands, updating Pinboard will obliterate my changes and require me to add them again by hand.

    What can I do to preserve these changes across upgrades?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic