WordPress.org

Ready to get started?Download WordPress

Forums

[closed] [Theme: Prana] Cleaning up the code (1 post)

  1. dynamitri
    Member
    Posted 1 year ago #

    Hi guys,

    I have slightly amended a part of my utility.php file, and went from:

    /** Prana Post Date */
    function prana_post_date() {
    
    	$post_date = esc_html( get_the_date() ) . " " . esc_attr( get_the_time() );
    
    	/** Output */
    	$output = sprintf( '<span class="entry-date" title="%1$s"><a href="%2$s" title="%3$s" rel="bookmark">%1$s</a></span>', $post_date, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ) );
    	return $output;
    
    }

    to

    /** Prana Post Date */
    function prana_post_date() {
    
    $post_date = esc_html ( get_the_date() ) . ( prana_entry_meta_sep() );	
    
    	/** Output */
    	$output = sprintf( '<span class="entry-date" title="%1$s"><a href="%2$s" title="%3$s" rel="bookmark">%1$s</a></span>', $post_date, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ) );
    	return $output;
    
    }

    What I wanted to achieve is i) getting rid of the timestamp (don't really need it), and ii) having the date followed by the backslash metadata separator (triggered by the prana_entry_meta_sep() function.

    I have achieved my aim in 50%, as it can be seen on http://www.dynamitri.pl. I have the metadata separator after the date. However, for some reason, as soon as I placed the prana_entry_meta_sep() function in an appropriate place, some code has cropped up before the date. Code that I cannot get rid of no matter how hard I try, without reducing the site to the point of giving me syntax errors. What happens right now is the date is preceded by three characters (so, they appear before the date):

    \ ">

    Oddly enough, they are not hyperlinked to anything (the date itself is). I went through all the .php files in my WordPress editor (not all of those on the server, mind you - didn't get down to that yet, would take the better part of the day probably). I've searched for those three characters - no results there. Searched through the utility.php file that I have altered, hoping to find those 3 mysterious chars there. Again, no result.

    Does anyone have any idea as to how to clean up the code, what the heck is actually generating those three characters, and how hide them? All suggestions would be greatly appreciated, I have spent last two hours trying to figure it out by trial and error and slowly running out of ideas… Thanks!

    Best,

    Dynamitri

    [Please continue - http://wordpress.org/support/topic/theme-prana-entry-meta-separators-in-posts%E2%80%A6-again?replies=8 ]

Topic Closed

This topic has been closed to new replies.

About this Topic