Skip to content
Michael edited this page Jun 11, 2023 · 19 revisions

How can I hide the tags, when I use the [tpcloud] shortcode?

Use the shortcode with the following parameters: [tp_cloud show_tags_as="none"]

How can I add longer course desciptions?

Write a long course descriptions as normal WordPress pages and add the page as related content to the course.

How can I display images in publication lists?

An example: [tplist image="left" image_size="70"] Important: You must specify both image parameters.

How can I protect course documents?

The plugin saves course documents in your WordPress upload directory under /teachpress/*course_id*. You can add a protection for this directory with a .htaccess file without affecting your normal media files.

How can I deactivate parts of the plugin like the course module?

If you want to use only the course or the publication system of the plugin, write the following in the wp-config.php file of your WordPress installation:

// Deactivate the course system.
define( 'TEACHPRESS_COURSE_MODULE', false );

// Deactivate the publication system.
define( 'TEACHPRESS_PUBLICATION_MODULE', false );

How can I change the position of the teachPress menu entries in the admin area?

Write one of the following snippets in the wp-config.php file of your WordPress installation.

// Example: Set the teachPress menu entries under the comments menu entry
define( 'TEACHPRESS_MENU_POSITION', 25 );

// Example: Set the teachPress menu entries under the dashboard entry
define( 'TEACHPRESS_MENU_POSITION', 2 );

For a list of possible positions, have a look to the WordPress Developer Documentation.

How can I prevent loading of Font Awesome or Academicons?

If your theme already uses Font Awesome fonts or the Academicons font, then you can deactivate loading in teachPress. To do so, write the following in the wp-config.php file of your WordPress installation:

// Deactivate Font Awesome.
define( 'TEACHPRESS_LOAD_ACADEMICONS', false );
// Deactivate Academicons.
define( 'TEACHPRESS_LOAD_FONT_AWESOME', false );

How can I change the directory of teachPress templates?

If you want to change the directory of teachPress templates, write the following at the beginning of the /* Includes */ part in the wp-content/plugins/teachpress/teachpress.php file:

// Change the teachPress template directory (moving it to wp-content/uploads/)
$tp_upload_dir = wp_upload_dir();
define( 'TEACHPRESS_TEMPLATE_PATH', $tp_upload_dir['basedir'] . '/teachpress/templates/' );
define( 'TEACHPRESS_TEMPLATE_URL', $tp_upload_dir['baseurl'] . '/teachpress/templates/' );

Don't forget to copy all files from the default directory to the new one!

Please note: Changes in the teachPress.php file doesn't survive a plugin update, which is the bad thing on the WordPress update system. So you have to change this after every update or you define the constants in the wp-config.php. But, there is also a problem: wp_upload_dir() can't be used in the wp-config.php file. So, you have to write the basic directory path manually, which looks like in this example:

// Changing the teachPress template directory (moving it to wp-content/uploads/).
// Paths needs to be configured manually
define( 'TEACHPRESS_TEMPLATE_PATH', dirname(__FILE__) . '/wp-content/uploads/teachpress/templates/' );
define( 'TEACHPRESS_TEMPLATE_URL', '/wp-content/uploads/teachpress/templates/' );

Why is Altmetric, Dimensions Badge, and PlumX support not available by default and how I can change that?

Using badges from Altmetric, Dimensions and Plumx needs loading external sources from third party servers. This is deactivated by default in teachPress. so decide by yourself, if you want to use that or not.

You can activate Altmetric support if you write the following in the wp-config.php file of your WordPress installation:

// Activate loading of external sources for Altmetric support.
define( 'TEACHPRESS_ALTMETRIC_SUPPORT', true );

After that, you can use shortcode parameters to show Altmetric information:

[tpcloud show_altmetric_entry="1" show_altmetric_donut="1"]
[tplist show_altmetric_entry="1" show_altmetric_donut="1"]

If a publication has a DOI, then the "Altmetric" tab should now be visible.

The same applies to support for Dimensions Badge and PlumX, i.e. support is enabled by adding

define( 'TEACHPRESS_DIMENSIONS_SUPPORT', true );

and

define( 'TEACHPRESS_PLUMX_SUPPORT', true );

respectively, to wp-config.php. The Dimensions Badge and the PlumX widget can then be shown with

[tpcloud show_dimensions_badge="1"]
[tplist show_dimensions_badge="1"]

and

[tpcloud show_plumx_widget="1"]
[tplist show_plumx_widget="1"]

Note that plugin administrators should register before using the Dimensions Badge on their site. Similarly, Plum requires that administrators agree to their terms of use before displaying the Metrics Artifact Widget.

Clone this wiki locally