Add Shortcodes To Sidebar

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).

  • Easy Thumbnails
    After we get our blogs up and running with all the bells and whistles, the next thing we want to do is to minimize the time to take for our pages to load. One of the way is to display our images with thumbnails instead of resizing the original ones to display smaller, this resizing the images to fit our liking does not help page loading performance. I stumbled onto… … Easy Thumbnails software and it’s amazing great, easy to use and extremely efficient. So, for every image folder, I would make thumbnails for every image in there, and it’s extremely fast using ezthumb software. The thumbnail images will have “tn_” prefix which is easy to identify especially placed in the same folder with the originals. Does it really help reducing the time of loading? Well, the page size is smaller and the page load time is 30% faster. Yes, we do have to do more work, display with actual thumbnails and link to the full size ones, but with the easy thumbnails, it’s painless and transparent. The website shows how to use it, but since I’m here, I would like to show how I did mine also. Install the software, then execute to ...
  • Multi-page Toolkit Plugin For WordPress
    I want to split a long tutorial post into many pages with link titles for easy navigation, let’s try this one. Make sure after installing this plugin, we need to fix the 404 error caused by this plugin. Installation Add the codes in “index.php”. The plugin has short cuts built in tinyMCE editor which makes it very easy to use. Just navigate to any part of the page to split, click the “next page” icon, then “page title” icon, enter the page name, and the page name is the for the content BEFORE this line NOT AFTER. When finish, just select the options settings for how the page will look. This setting is for this blog. other settings and displays We can try many other settings, but the dropdown view all is the best one for now.
  • List Category Posts Plugin For WordPress
    List category posts plugin let us to list the post within the category. Normally we would put the plugin code in the end of post to list the posts within the category. The parameters show options for the codes. So this post will be listed under plugins category, at the end of this post we will list all the posts within this category and the codes will be: or we can use the category name. remove the ‘ before catlist. or if we know the id of the category to find catid, just go to dashboard-categories-click the category we want to find id, it will show up in the url bar. The default for numberposts = 5 in the php file. If we want to change to maximum so that we don’t have to add parameter “numberposts” every time and just use “categorypage=yes” is more convenient and easier to remember, we need to modify “5” to “0” *categorypage parameter used with number of posts =5 *name=plugins number of posts = 4 *id=31 numberposts=0 = all
  • SEO Intelligent Tag Cloud Problems
    I was testing users with different roles and none of them can get in the profile page to change passwords or edit any posts even they’re “editors”. I thought it was the database problem, but it’s the SEO Intelligent Tag Cloud that caused the problem with users rights. It seems to block everyone except admin from going to dashboard. Deactivate it and everything is fine, users can access the profile page. This plugin also add a website link at the bottom of the footer area. To remove this addition, I need to edit the plugin php: “/wp-content/plugins/seo-intelligent-tag-cloud/wp_tag_cloud.php” and delete all these at the end function wtc_footer(){ echo ‘<p style=”text-align: center; font-size:10px”>Powered by <a href=”‘.LINK_ADMIN.'” target=”_blank”>’.POWERED_BY.'</a></p>’; } add_action( ‘wp_footer’, ‘wtc_footer’ );
  • Protect WP-Config.php File
    The wp-config.php file is the file that shows the blog database with username, password. If any hackers can read this file and get all the information, they can mess up the database if they want to. I found this on the website and hope it does work with our WordPress. Edit “.htaccess” of the blog root and resave – set the permission to 444.      # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /family/ RewriteRule ^index.php$ – RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /family/index.php </IfModule> # END WordPress # protect the htaccess file <files .htaccess> order allow,deny deny from all </files> # disable the server signature ServerSignature Off # protect wpconfig.php <files wp-config.php> order allow,deny deny from all </files>

Leave a Reply

Your email address will not be published. Required fields are marked *