If you'd rather not generate your own WordPress queries, use shortcodes to return a list of projects.
Shortcodes can be used within most WordPress content editors via the page editor or text widgets. Furthermore, you can also use shortcodes in visual page builders like Beaver Builder.
If you'd prefer to use shortcodes with PHP, use the do_shortcode function.
<?php echo do_shortcode('[name_of_shortcode]'); ?>
Display a list of projects
Shortcodes allow you to return a list projects including the project language, number of stars, number of forks, and a brief description.
The style of the list and images depends on your own CSS, but the structure is generated by the shortcode.
[fsd_github_list_widget style="list" type="recent" link_to="github_repository" count="3" default="no projects found"]
We offer several parameters that allow you to customize the list:
style: change the layout of the list. Options: list, image_list, and image_list_gradient
link_to: specify the permalink. Leave blank for no link. Options: github_repository, github_website, and website_override (the project website link you manually define in the post editor)
type: filter by featured, archived, or most recent. Options: recent, featured, archived.
count: limit the number of projects in the list
default: if no projects are found, return an optional string like "no results found"
Display a list of archived projects, include the featured image with the background gradient (specified in project settings), and do not link to anything:
[fsd_github_list_widget style="image_list_gradient" type="archived" default="no projects found"]
Display all recent projects in a simple list format with no image. Link to the website that was manually specified in the project settings:
[fsd_github_list_widget style="list" type="recent" link_to="website_override" default="no projects found"]
Display 3 featured projects, include the left-aligned featured image, and link to the github repository:
[fsd_github_list_widget style="image_list" type="featured" link_to="github_repository" count="3" default="no projects found"]