https://getshortcodes.com/docs/posts/
Template editing
Do not edit templates in the plugin folder, since all your changes will be lost after plugin update.
To modify a built-in template you should copy it to your theme directory first. For convenience, you can copy the whole templates
folder from the plugin folder. You can rename the copied folder, it doesn’t have to be templates
. Resulting path to template files should look like so:
/wp-content/themes/THEME-NAME/templates/
Now you can edit copied template files.
Use the template
attribute to change the template used by shortcode. The value of this attribute must be a template file path relative to your theme’s folder. Example:
Automaton Dab Rig
https://store.thedabbingspecialists.com/products/automaton-dab-rig Automaton Dab Rig $49.95 Automaton Dab Rig [click to view our shipping policies] Description for Part Number 1170 Scroll Thru Images to See a Function Video! If you’re looking for a super cool banger hanger with a mini form factor, and incredible function, then look no further! These are super cool in the hand …
Javascript Notes Dec 2022
https://courses.reactbootcamp.com/courses/927296/lectures/17117784 Sloppy Strict Javascript has 2 modes – generally set to sloppy. to set strict for entire file ‘use strict’; // just add to top of file
Sella – Speed Test
ROUND 1 OK – so first went through and compressed the images (we were getting some "huge network load" warnings in the HIGH warning area at first) I also implemented LAZY LOADING on the external images – so that they are not loading til the user scrolls down to that screen – saving us that …
BuyForFriend Pick Gift – Signup Page
http://join.huntformen.com/track/MTA0NjQ0LjMxLjguMTM5LjAuMC4wLjAuMA/join (Buy for friend sales copy) Part 1: Pick a Gift Membership: select a gift for a friend Fill in YOUR information for YOUR free day on NakedSword.com (see YOUR 1 DAY BONUS specific steps below) (Buy for friend gift options – currently only 1) 1-DAY 49.95 /MONTH For Friend Part 2: Finalize Gift + …
BuyForFriend Approval Page
Hello (MemberFirstName), DETAILS FOR GIFT MEMBERSHIP Grab the code for your friend from the approval email you will receive (this email also confirms YOUR 1 day membership). SAVE the email / or copy the gift code – it is the only copy. All gift memberships must be redeemed within 45 days of purchase. …
BuyForFriend NonMember Confirm Email
SUBJECT LINE FOR EMAIL: HuntforMen.com – SAVE THIS EMAIL – Gift Code + Your FREE 1 day! Hello (MemberFirstName), YOUR GIFT MEMBERSHIP – SAVE THIS EMAIL Thank you for getting a GIFT MEMBERSHIP! This is all your friend needs to activate his FREE membership: LINK: https://join.huntformen.com/track/MTA0NjQ0LjMxLjguMTM4LjAuMC4wLjAuMA/join COUPON CODE: GIFTXXXXXX YOUR FREE 1 DAY MEMBERSHIP …
mail-member-cancelled-html – cancel coming email
SUBJECT LINE FOR EMAIL: 1 Day?! Better start watching at HuntForMen.com! JUST A REMINDER – YOU MEMBERSHIP ONLY LASTS FOR 1 DAY! Hello (MemberFirstName), Be sure to make the most of your membership at HuntForMen.com, and we hope you won’t leave us for good! With exclusive NakedSword Originals content you won’t find anywhere else, plus two … mail-member-cancelled-html – cancel coming email Read More »
Redeem Coupon
Page redeemer inputs coupon code + signs up
https://join.huntformen.com/track/MTA0NjQ0LjMxLjguMTM4LjAuMC4wLjAuMA/joinTEST COUPON: HUNTFRIENDGIFT STEP 1: Setup a Username / PW for your gift account STEP 2: Enter your gift code (STEP 3 – gift join option pops up (above promo fields)– they select option– then hit start watching)
Redeem – Approval Page + Approval Email + Cancel Email
currently using standard template
Membership Approved Page Membership Approved Email Membership Ending Email
In the example above the plugin will search for a template in the following locations (in the specified order):
/wp-content/themes/child-theme/templates/default-loop.php
/wp-content/themes/parent-theme/templates/default-loop.php
/wp-content/plugins/shortcodes-ultimate/includes/partials/shortcodes/posts/templates/default-loop.php
Creating custom templates
The https://store.thedabbingspecialists.com/products/automaton-dab-rig Automaton Dab Rig $49.95 Automaton Dab Rig [click to view our shipping policies] Description for Part Number 1170 Scroll Thru Images to See a Function Video! If you’re looking for a super cool banger hanger with a mini form factor, and incredible function, then look no further! These are super cool in the hand … https://courses.reactbootcamp.com/courses/927296/lectures/17117784 Sloppy Strict Javascript has 2 modes – generally set to sloppy. to set strict for entire file ‘use strict’; // just add to top of file mail-member-cancelled-html – cancel coming email Read More »
shortcode supports custom templates, which makes it incredibly powerful. Follow the steps below to create one.
Automaton Dab Rig
Javascript Notes Dec 2022
Sella – Speed Test
BuyForFriend Pick Gift – Signup Page
BuyForFriend Approval Page
BuyForFriend NonMember Confirm Email
mail-member-cancelled-html – cancel coming email
Redeem Coupon
Page redeemer inputs coupon code + signs upRedeem – Approval Page + Approval Email + Cancel Email
currently using standard template
Step 1
Create a new folder in your theme directory and name it su-posts-templates
, so the resulting path would be:
/wp-content/themes/YOUR-THEME-NAME/su-posts-templates/
Step 2
Create a new file in the su-posts-templates
folder and name it my-template.php
. The resulting path would be:
/wp-content/themes/YOUR-THEME-NAME/su-posts-templates/my-template.php
Step 3
Put the following snippet into the created file:
<?php if ( $posts->have_posts() ) : ?>
<div class="su-posts su-posts-my-template">
<?php while ( $posts->have_posts() ) : ?>
<?php $posts->the_post(); ?>
<a href="<?php%20the_permalink();%20?>"><?php the_title(); ?></a>
<?php endwhile; ?>
</div>
<?php else : ?>
<p>Posts not found!</p>
<?php endif; ?>
Step 4
Now you can use the created template:
Adding custom template paths
If you need to store your templates outside of the theme directory, you can extend the list of allowed template paths. Use the following snippet in a custom plugin or in the functions.php
file:
add_filter(
'su/shortcode/posts/allowed_template_locations',
function( $locations ) {
// /wp-content/
$locations[] = WP_CONTENT_DIR;
return $locations;
},
10,
1
);
The code above will allow you to store templates under /wp-content/
directory.
Pagination Plugin
https://wordpress.org/plugins/wp-paginate/
Description
LATEST NEWS
WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
In addition to increasing the user experience for your visitors, it has also been widely reported that pagination increases the SEO of your site by providing more links to your content.
You can add custom CSS for your pagination links with the Custom CSS tab in WP-Paginate Settings.
Starting in version 1.1, WP-Paginate can also be used to paginate post comments!
Translations: https://plugins.svn.wordpress.org/wp-paginate/I18n (check the version number for the correct file)
FAQ
-
How can I override the default pagination settings?
The
wp_paginate()
andwp_paginate_comments()
functions each takes one optional argument, in query string format, which allows you to override the global settings. The available options are:title – The text/HTML to display before the pagination links
nextpage – The text/HTML to use for the next page link
previouspage – The text/HTML to use for the previous page link
before – The text/HTML to add before the pagination links and title
after – The text/HTML to add after the pagination links
empty – Display before markup and after markup code even when the page list is empty
range – The number of page links to show before and after the current page
anchor – The number of links to always show at beginning and end of pagination
gap – The minimum number of pages before a gap is replaced with an ellipsis (…)Y
ou can even control the current page and number of pages with:
page – The current page. This function will automatically determine the value
pages – The total number of pages. This function will automatically determine the value
Example (also applies to ‘wp_paginate_comments()`)
<?php if(function_exists('wp_paginate')) { wp_paginate('range=4&anchor=2&nextpage=Next&previouspage=Previous'); } ?>
Github – shortcode w/pagination example
https://gist.github.com/raselahmed7/b8ff6fb24d782c3b2c63
custom-post-loop-with-pagination-shortcode.php
<?php
function portfolios_shortcode($atts){
extract( shortcode_atts( array(
'expand' => '',
), $atts) );
global $paged;
$posts_per_page = 6;
$settings = array(
'showposts' => $posts_per_page,
'post_type' => 'portfolio',
'orderby' => 'menu_order',
'order' => 'ASC',
'paged' => $paged
);
$post_query = new WP_Query( $settings );
$total_found_posts = $post_query->found_posts;
$total_page = ceil($total_found_posts / $posts_per_page);
$list = '<div class="portfolio-item-list">';
while($post_query->have_posts()) : $post_query->the_post();
$list .= '
<div class="single-portfolio-item">
</div>
';
endwhile;
$list.= '</div>';
if(function_exists('wp_pagenavi')) {
$list .='<div class="page-navigation">'.wp_pagenavi(array('query' => $post_query, 'echo' => false)).'</div>';
} else {
$list.='
<span class="next-posts-links">'.get_next_posts_link('Next page', $total_page).'</span>
<span class="prev-posts-links">'.get_previous_posts_link('Previous page').'</span>
';
}
return $list;
}
add_shortcode('portfolios', 'portfolios_shortcode');