WordPress.org

Ready to get started?Download WordPress

Forums

Make PDF Newspaper
adding author by line to post (1 post)

  1. ParticularlyEvil
    Member
    Posted 3 years ago #

    Any suggestions on how to modify this code so we can get the author byline in the post? It would be great to have that for a newspaper with many authors!

    public function addItem($title, $content, $date=0, $author)
    	{
    		$cancel_add = false;
    		$html = '<div class="heading-div" style="page-break-inside: avoid;"><h1 style="line-height: 1.2;">'.$title.'</h1>';
    		$html .= '<tcpdf method="clearEmptyLnSpace" />';
    		if ((int)$date != 0) {
    			$html .= '<p>'.date_i18n(get_option('date_format').' '.get_option('time_format'), $date).'</p>';
    		}
    		$html .= '</div>';
    			$html .= '<p>'get_author().'</p>';
    		//if (preg_match('/The ska and dub/i', $content)) { die($content); }
    		$html .= $content;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by ParticularlyEvil
  • This topic is not resolved
  • WordPress version: 3.1.1