https://github.com/bradjc/wordpress-academic-pubs
Plugin for wordpress that adds support for creating a list of academic publications.
https://github.com/bradjc/wordpress-academic-pubs
Last synced: about 1 year ago
JSON representation
Plugin for wordpress that adds support for creating a list of academic publications.
- Host: GitHub
- URL: https://github.com/bradjc/wordpress-academic-pubs
- Owner: bradjc
- Created: 2012-05-05T02:15:53.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2019-02-21T15:15:42.000Z (over 7 years ago)
- Last Synced: 2025-05-13T01:13:50.810Z (about 1 year ago)
- Language: PHP
- Size: 203 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
wordpress-academic-pubs
=======================
Plugin for wordpress that adds support for creating a list of academic publications.
Admin
-----
WPAP adds a section to the wordpress admin panel named "Publications". Here you
can add publications and publication categories. Publications are ordered by the
wordpress "published date" so the order you create the publications doesn't
matter.
Display
-------
### Shortcode
WPAP supports shortcodes. To use, just add:
[academicpubs]
to your posts.
### PHP Function
To display publications in a template, you can use two functions:
/* Returns a list of publications. Each publication contains key,val pairs.
*
* $options: array('option' => 'value')
*
* Returns: [['id':1, 'title':'Paper Name', 'pdf_url':'http://a.com'],
* [another pub...]]
* fields are: id, title, authors, conference, pdf_url, bibtex_url
*/
wpap_display_publications($options);
/* Returns html around each publication.
*/
wpap_display_publications_formatted($options);
Options
-------
WPAP supports some options:
~~~~~~~
category => '',
numbered => 'false',
limit => -1,
reverse => 'false',
show_links => 'true',
page_num => '',
num_per_page => '',
~~~~~~~
### With shortcodes
[academicpubs category=selected,science numbered=true limit=5 reverse=true show_links=false]
### With PHP functions
'selected,science',
'reverse' => 'true',
'show_links' => 'false');
$pubs = wpap_display_publications($opts);
foreach ($pubs as $pub) {
echo '
' . $pub['title'] . '
';
}
?>
Or the easy way:
'true',
'limit' => 10);
echo wpap_display_publications_formatted($opts);
?>
Example Output
--------------
Reasonable CSS
--------------
.wpap .publication-title {
font-size: 110%;
font-weight: bold;
}
.wpap p {
margin: 0;
padding: 0;
}
.wpap ul {
list-style: none;
margin: 0;
}
.wpap li {
margin-bottom: 15px;
}