Hello,
To achieve this, you will have to duplicate the teachpress template folder in your uploads directory and edit the PHP template code.
– Visit Teachpress settings page (settings > teachpress)
– open the “template” tab
– Click on the link at the top of the “temlplate” tab content : “But you can change the directory for the templates” and the plugin will display the code you have to add in wp-config.php.
Something like :
define (‘TEACHPRESS_TEMPLATE_PATH’, ‘/……/wp-content/uploads/teachpress/templates/’);
define (‘TEACHPRESS_TEMPLATE_URL’, ‘…../wp-content/uploads/teachpress/templates/’);
– duplicate Teachpress template folder (/wp-content/plugins/teachpress/templates/) at the new path (/wp-content/uploads/teachpress/templates/)
– Edit the files as you need.
That may be tricky of you don’t have good knowledge of PHP language.
In example, here is the code I use to change the display for authors and have their names just separated by commas, with a simple str_replace() on the authors values.
public function get_entry ($interface) {
$auteurtemp = $interface->get_author('<p class="tp_pub_author">', '</p>');
$auteurtemp = str_replace(",","",$auteurtemp);
$auteurtemp = str_replace(";",",",$auteurtemp);
// $auteurtemp = str_replace("</p>",".</p>",$auteurtemp);
$class = ' tp_publication_' . $interface->get_type('');
$s = '<div class="tp_publication' . $class . '">';
$s .= $interface->get_number('<div class="tp_pub_number">', '.</div>');
$s .= $interface->get_images('left');
$s .= '<div class="tp_pub_info">';
$s .= $auteurtemp;
$s .= '<p class="tp_pub_title">' . $interface->get_title() . ' ' . $interface->get_type() . ' ' . $interface->get_label('status', array('forthcoming') ) . '</p>';
$s .= '<p class="tp_pub_additional">' . $interface->get_meta() . '</p>';
$s .= '<p class="tp_pub_menu">' . $interface->get_menu_line() . '</p>';
$s .= $interface->get_infocontainer();
$s .= $interface->get_images('bottom');
$s .= '</div>';
$s .= $interface->get_images('right');
$s .= '</div>';
return $s;
}
You can compare it with the original code in the files you use as template (tp_template_20xx.php).
Hope this helps !
-
This reply was modified 2 years, 12 months ago by Ishko.