Skip to content

Instantly share code, notes, and snippets.

@tatianepires
Last active July 10, 2016 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tatianepires/b1ee485c85489c0e6dae to your computer and use it in GitHub Desktop.
Save tatianepires/b1ee485c85489c0e6dae to your computer and use it in GitHub Desktop.
Code for WordPress that adds a widget to select categories to be linked.
@tatianepires
Copy link
Author

Save tps-widget-select-categories-to-link.php on your template folder and add the following to the file functions.php of your theme:
require_once( get_template_directory() . '/tps-widget-select-categories-to-link.php' );

@tatianepires
Copy link
Author

Preview of the widget in WordPress' admin.
widget-links-de-categorias

@tatianepires
Copy link
Author

Style the widget output with Font Awesome icons.
/* Categories */ .cat-item a:before { content: "\f07b"; font-family: FontAwesome; padding-right: 5px; } .cat-item a:hover:before { content: "\f07c"; padding-right: 3px; }
links-de-categorias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment