Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #288372

    Hi,

    In the magazine section. how to replace the date with price and transfer it after the title? please see https://webtechnology.ph

    • This topic was modified 10 years, 5 months ago by ChaosWeb.
    #288546

    Hey Roy!

    Thank you for using the theme.

    This is possible but you’ll need to modify the theme files. Edit config-templatebuilder > avia-shortcodes > magazine.php, find this code on line 571:

    $output .= 		"<div class='av-magazine-content-wrap'>";
    			$output .=		"<header class='entry-content-header'>";
    			$output .=			"<time class='av-magazine-time updated' {$markupTime}>".$time."</time>";
    			$output .=			$separator.$author;
    			$output .=			"<{$titleTag} class='av-magazine-title entry-title' {$markupTitle}>{$title}</{$titleTag}>";
    			$output .= 		"</header>";
    if($excerpt)$output .=		"<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}</div>";
    			$output .= 		"</div>";
    			$output .= 		"<footer class='entry-footer'></footer>";
    			$output .= "</article>";

    Replace it with:

    global $product;
    			$product = new WC_Product( $entry->ID );
    			$price = $product->price;
    		
    			$output .= 		"<div class='av-magazine-content-wrap'>";
    			$output .=		"<header class='entry-content-header'>";
    			$output .=			"<time class='av-magazine-time updated' {$markupTime}>$ ".$price."</time>";
    			$output .=			$separator.$author;
    			$output .=			"<{$titleTag} class='av-magazine-title entry-title' {$markupTitle}>{$title}</{$titleTag}>";
    			$output .= 		"</header>";
    if($excerpt)$output .=		"<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}</div>";
    			$output .= 		"</div>";
    			$output .= 		"<footer class='entry-footer'></footer>";
    			$output .= "</article>";

    Cheers!
    Ismael

    #306453

    These codes work well for me, thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Magazine replace date with price’ is closed to new replies.