puts pagination on sidebar and attempts to fix post link path bug