Template Tags / linkToProject()

Description

This function creates a URL that can be used in an <a> tag. It is automatically adjusted based on the clean URLs option.

Usage

<?php echo linkToProject( $id ); ?>

Parameters

$id

  • integer or string
  • optional

The ID number or slug of the project to link to. Defaults to currently selected project.

Examples

Usage in projects_list.html

<a href="<?php echo linkToProject(); ?>"><?php echo projectTitle(); ?></a>

Link to a specific project

<a href="<?php echo linkToProject( 'project-slug' ); ?>">Take a look!</a>