Themes Tips And Tricks WordPress

Add Shortcodes To Sidebar

September 18, 2012 | 1,146 views |

Since WordPress is php based, in order to use shortcodes on the sidebar or anywhere on the theme, we have to use echo.

<h2><?php echo do_shortcode(‘ catlist categorypage=yes excerpt=yes excerpt_size =255)]’); ?></h2>

This is the shortcodes for catlist to list related posts in the same category on the sidebar for my single.php that I’m designing right now (the right bracket before ‘catlist’ is missing).

  • Serenti Theme for Word Press
    is a very fast theme and mobile friendly. It’s free. I modified some parts and made it for all my blogs. Normally I have to test with all the speed, , and to make sure it’s the best one out there. I also like the and .
  • WP Ocius By Candid Themes
        Since my blogs are for personal use, I’ve tried to keep it up and find the best free themes to use, I’ve found Ocius and Fairy from Candid Themes are quite fast and simple. I’ve used gtmetrix and pagespeed to test, if these two are good, then I use them. I don’t use a lot of options for my blogs, a few modifications to customize for my blogs. Since there are google and amazon ads to generate enough money to pay for Inmotionhosting and domains, the speed can never be perfect due to ads scripts, but as long as it’s fast loading, it’s good.
  • How To Customize Colorlib Sparkling Theme
        has 2 light weight, mobile friendly and fast themes that I like, and . Today I’m going to customize the Sparkling theme for my blogs. The goal is to get the theme to display social icons and links at entry-meta, display thumbnails on the recent posts and work with all my shortcodes.     -This theme doesn’t have the social icon links like Blaskan, so I had to modify the “inc/template-tags.php” to add the social icons and links. $url   = urlencode( esc_url(get_permalink()) ); $title = urlencode( esc_attr(get_the_title()) ); echo ‘<a href=”’ . $url . ‘” target=”_blank” class=”social-icons”><i class=”fa fa-facebook” aria-hidden=”true”></i></a>’; echo ‘<a href=”’ . $url . ‘” target=”_blank” class=”social-icons”><i class=”fa fa-twitter” aria-hidden=”true”></i></a>’;         if ( has_post_thumbnail() ) {             $image = urlencode( esc_url((get_the_post_thumbnail_url( get_the_ID(), ‘full’ ))) );  echo ‘<a href=”’ . $url . ‘&media=’ . $image . ‘” target=”_blank” class=”social-icons”><i class=”fa fa-pinterest-p” aria-hidden=”true”></i></a>’;         }  echo ‘<a href=”’ . $url . ‘&title=’ . $title . ‘” target=”_blank” class=”social-icons”><i class=”fa fa-linkedin” aria-hidden=”true”></i></a>’;  echo ‘<a href=”mailto:?subject= I want to share this post&amp;body= good read ‘ . $url . ‘” target=”_blank” class=”social-icons”><i class=”fa fa-envelope-o” aria-hidden=”true”></i></a>’;      -To load all my custom shortcodes, I need to modify ...
  • WP Blaskan Theme by Colorlib
    I’ve always tried to make the website of faster, I’ve been changing themes to update with the latest technologies. I’d found Blaskan theme by Colorlib and sparkling are extremely light and fast for my I used GTMetrix and Pagespeed to test and they both came out very good, although the scripts from Amazon and Adsense ads can cause the speed to be slow, but there’s nothing I can do about it.  
  • WP-5.6 Breaks My Themes
    After updated WP-5.6, my search, home and others became black screen with a close x, but it can’t be closed. I needed to download WP-downgrade to reinstall WP-5.5.3 and everything is back to normal. This breaks both desktop and mobile screens.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.