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

  • MooImageTip For WordPress
    03/16/2017 Now we use Jquery image preview. I’ve been using MooImageTip for NucleusCMS for a while and I liked it. It’s been new to me on WordPress, I’m writing this so I can remember how I make it work in WordPress. The website for MooImageTip Since I’m using Mediabox Advanced 1.2.5 which also use Mootools, I placed the mooimagetip.js inside my “mediaboxadv” folder with the “dognmonkey.css” file and load them on header.php of my favorite modified only theme “techozoic-fluid”.      <link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo(‘template_url’); ?>/mediaboxadv/dognmonkey.css” /> <!-mediaboxadv–> <script src=”<?php bloginfo(‘template_url’); ?>/mediaboxadv/mootools-1.2.5-core-nc.js” type=”text/javascript”></script> <script src=”<?php bloginfo(‘template_url’); ?>/mediaboxadv/Quickie.js” type=”text/javascript”></script> <script src=”<?php bloginfo(‘template_url’); ?>/mediaboxadv/ltooz134.js” type=”text/javascript”></script> <link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo(‘template_url’); ?>/mediaboxadv/mediaboxAdvBlack.css” /> <!-end mediaboxadv–> <script src=”<?php bloginfo(‘template_url’); ?>/mediaboxadv/idogimagetip.js” type=”text/javascript”></script> <!-mooimagetip end–> I need to edit the “mootools-1.2.5-core-nc.js” to add the DOM scripts at the end of the file. // Just create the object in the DOM ready event window.addEvent(‘domready’,function(){ var myImageTip =new MooImageTip(); }); // If you want to customize the tip, you can use some options window.addEvent(‘domready’,function(){ var myAdvancedImageTip =new MooImageTip({ offset:{x:4, y:4}, // Offset relative to mouse position className:‘mylinks’, // This is the links class name tipId:‘mytip’, // This is the tip ID, for styling follow:false, // Tip will not follow the mouse cursor fx:{ duration:‘short’} // Additional Fx options }); }); Since the “mooimagetip.js” uses “rel” to link images which conflicts with many of my ...
  • Fix Category Error 404 By Multi-page Toolkit
    After installing Multi-page toolkit, my website start to have error 404 when a category link is clicked. To solve this problem Edit plugin php file     Change site url by adding 1 to the end and re-save, then change it back to original then re-save. Everything will come back with category links and no 404. Cheers, idog
  • Using Pageview Plugin
    Pageview plugin is to embed and iframe page into WordPress post or page.
  • WP-PostViews
    One of the plugins I want to add to the blogs is WP-PostViews, this one shows the page view counts on the title index and single pages. The set up is pretty straight forward, although we have to edit the index.php and single.php of our theme. We can download WP-PostViews from the plugins page or just use the add plugins from the admin page. We used the admin page. The codes that we need to add in the index.php (to display at the main page) and the single.php (to display at single page) and page.php after the “category”, before “edit” are below. <?php the_views() ; ?> If everything is done correctly, we should have the views displayed on both main page and single page after the title.

Leave a Reply

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