Skip to content

Shortcode Reference: [tpsearch]

Michael edited this page Jan 18, 2025 · 12 revisions

Description

Use this shortcode if you want to show a search function for publications in a post or a page.

Parameters

user (optional)

(integer) The IDs of the user you want to include into the search area (separated by comma).

tag (optional)

(integer) The IDs of the tags you want to include into the search area (separated by comma).

pagination (optional)

(integer) Activates pagination (1) or not (0). Default is 1.

entries_per_page (optional)

(integer) The number of entries per page. Default is 20. Don't set entries_per_page to "0", use pagination="0" instead.

image (optional)

(string) Sets the image position to: left, right or bottom. Default is none (No images displaying).

image_size (optinal)

(integer) Maximum size of an image in px. Default is 0. Use this only together with the „image“-parameter.

image_link (optional) new since 7.1.0

(string) Sets the global link target for the images. Please note, that the local image target setting of a publication can overwrite the global option. The following options are available:

  • none (default): No link will be set.
  • self: The link refers to the the image source
  • rel_page: The link refers to the related page if this is set for the publication
  • external: The link refers to the external URL if this is set for the publication

author_name (optional)

(string) Defines the style of the author names. The possible styles are simple, old, last or initials. Default is initials.

Examples: If you have the name: Ludwig C. van der Vaart

The output is the following:

simple --> Ludwig C. van der Vaart

old --> Vaart, Ludwig C. van der

last --> van der Vaart, Ludwig

initials --> van der Vaart, Ludwig C

short --> van der Vaart LC

editor_name (optional)

(string) Defines the style of the editor names. The possible styles are simple, old, last or initials. Default is initals. The usage is similar to author_name.

author_separator (optional) new since 6.0.4

(string) Sets the separator between different authors of a publication. The default is ";".

Example:
[tpsearch author_separator="," editor_separator=","]

editor_separator (optional) new since 6.0.4

(string) Sets the separator between different editors of a publication. The default is ";".

style (optional)

(string) Defines the style of your publication list. The possible styles are:

  • none (default)
  • numbered: Numbered publication list, number is ascending
  • numbered_desc: Numbered publication list, number is descending

template (optional) new since 6.0.0

(string) Sets the template key for the publication list. The default is "tp_template_orig_s".

title_ref (optional) new since 6.0.0

(string) Sets which info box is linked whith the publication title. The possible options are: links (default): The info box with the links abstract: The info box with the abstract

link_style (optional)

(string) The style of publication links. The possible styles are:

  • inline (default): The title of the publication is a link which opens an info box.
  • images: All links will be direct displayed as little icons behind the publication.
  • direct: The title of the publication opens the first link. All links are visible in the info box.

use_as_filter (optional)

(integer) This parameter defines if all publications are visible by default (1) or not (0). Default is 1.

date_format (optional)

(string) This parameter defines the format for dates and is used for some publication types (presentation,online). Default is d.m.Y. For possible values have a look to the documentation of PHP’s date funciton.

order (optional)

(string) Defines the sort order of the publication list. Default is date DESC. Other possible values: title DESC, title ASC, date ASC,…

show_bibtex (optional) new since 6.0.0

(integer) Define if you want to show the bibtex box under each publication (1) or not (0). Default is 1.

show_comment (optional) new since 9.0.7

(integer) Define, if you want to show the private comment box under each publication (1) or not (0). Default is 0.

comment_text (optional) new since 9.0.7

(string) Sets the text used for the comment link, if shown. Default: 'Comment'.

comment_tooltip (optional) new since 9.0.7

(string) Sets the tooltip text for the comment link, if shown. Default: 'Show comment'.

container_suffix (optional)

(string) A suffix which can optionally set to modify container IDs in publication lists. It’s not set by default.

show_tags_as (optional)

(string) Defines the style of the tags or their filter. You can choice between:

  • cloud - Shows a tag cloud as filter and tags with links under each publication
  • pulldown - Shows a pulldown as filter and tags with links under each publication
  • plain - Shows no filter and tags without links under each publication
  • none - Shows no tags.

Default is none.

show_author_filter (optional) new since 7.0.0

(integer) Defines if an author filter is visible (1) or not (0), Default: 0

show_type_filter (optional) new since 7.0.0

(integer) Defines if a type filter is visible (1) or not (0), Default: 0

show_user_filter (optional) new since 7.0.0

(integer) Defines if an user filter is visible (1) or not (0), Default: 0

show_year_filter (optional) new since 7.0.0

(integer) Defines if a year filter is visible (1) or not (0), Default: 0

Examples

[tpsearch]

Changelog

  • Since: 4.0.0
  • 4.2.0: Parameters user and tag added.
  • 4.2.1: Style option „std_num“ added
  • 4.3.5: New link style option (link_style=“direct“) added
  • 4.3.11: New parameter „order“ added
  • 5.0.2: New parameter „container_suffix“ added
  • 6.0.4: New parameters "author_separator", "editor_separator" added
  • 7.0.0: New parameters "show_tags_as", "show_author_filter", "show_type_filter", "show_user_filter", "show_year_filter" added. Parameter "as_filter" is replaced with "use_as_filter". All parameters of [tpcloud] or [tplist] are also available.
  • 7.1.0: Changed behavior for parameter "image_link"
  • 8.0.0: "short" option added for author/editor names