The LAMA stack - Linux, Apache, MySQL, ASP.NET Core
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add to functions.php | |
| // Pagination for paged posts, Page 1, Page 2, Page 3, with Next and Previous Links, No plugin | |
| function html5wp_pagination() | |
| { | |
| global $wp_query; | |
| $big = 999999999; | |
| echo paginate_links(array( | |
| 'base' => str_replace($big, '%#%', get_pagenum_link($big)), | |
| 'format' => '?paged=%#%', | |
| 'current' => max(1, get_query_var('paged')), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ----- BEGIN LICENSE ----- | |
| sgbteam | |
| Single User License | |
| EA7E-1153259 | |
| 8891CBB9 F1513E4F 1A3405C1 A865D53F | |
| 115F202E 7B91AB2D 0D2A40ED 352B269B | |
| 76E84F0B CD69BFC7 59F2DFEF E267328F | |
| 215652A3 E88F9D8F 4C38E3BA 5B2DAAE4 | |
| 969624E7 DC9CD4D5 717FB40C 1B9738CF | |
| 20B3C4F1 E917B5B3 87C38D9C ACCE7DD8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Post Thumbnail Grid */ | |
| .gridcontainer h2 a{color: #333; font-size: 13px;} | |
| .gridcontainer .griditemleft{float: left; width: 150px; margin: 0 30px 20px 0;} | |
| .gridcontainer .griditemright{float: left; width: 150px;} | |
| .gridcontainer .postimage{margin: 0 0 5px 0;} | |
| .gridcontainer .postimage-title {text-align: center;} |
$ sudo apt-get update
$ sudo apt-get install ruby ruby-dev make gcc
$ sudo gem install jekyll bundler
see source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'admin_menu', 'ms_mailchim_admin_menu', 99 ); | |
| function ms_mailchim_admin_menu() { | |
| add_submenu_page( 'membership2', __( "Mailchimp Subscribe" ), __( "Mailchimp Subscribe" ), 'manage_options', 'ms-mailchimp-subsribe', 'ms_mailchim_exec' ); | |
| } | |
| function ms_mailchim_exec() { | |
| ?> | |
| <div class="wrap"> | |
| <form method="post"> | |
| <input type="text" name="list_id" placeholder="Mailchimp list id"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Before implementing this jekyll snippet make sure | |
| 1. you have signed up with Mailchimp. | |
| 2. you have created a list in Mailchimp. | |
| 3. you have defined the list in _config.yml, | |
| for ex: "mailchimp-list: //redgadgets.us10.list-manage.com/subscribe/post?u=210acce5db69d3d4a04b0e25d&id=08c6708f40" | |
| --> | |
| <form action="{{site.mailchimp-list}}" method="post" name="mc-embedded-subscribe-form" class="wj-contact-form validate" target="_blank" novalidate> | |
| <div class="mc-field-group"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% comment %} | |
| * | |
| * Counter: This include counts the your jekyll posts | |
| * | |
| {% endcomment %}{% assign counter = 1 %}{% for item in site.posts %}{% unless item.published == false %}{% assign counter=counter | plus:1 %}{% endunless %}{% endfor %}{{ counter }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- using the split filter --> | |
| {% for post in site.posts limit:10 %} | |
| <div class="post-preview"> | |
| <h2><a href="{{ post.url }}">{{ post.title }}</a></h2> | |
| <span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span> | |
| {{ post.content | split:'<!--break-->' | first }} | |
| {% if post.content contains '<!--break-->' %} | |
| <a href="{{ post.url }}">read more</a> | |
| {% endif %} | |
| </div> |
