Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tcrmovies

    (@tcrmovies)

    Example:

    var vaar = "false";
    	$.getJSON("https://site(dot)com/?json=get_post&post_id=3931", function(data) {
    		vaar = "true";
    
        });
    	if(vaar == "false"){
    		alert("Something wrong");
    	}else{
    		alert("Perfectly !");
    	}

    It display: Something wrong

    Thread Starter tcrmovies

    (@tcrmovies)

    I don’t see nothing .. ??

    Thread Starter tcrmovies

    (@tcrmovies)

    this is the function

    function theme_pagination($pages = '', $range = 4){
         $showitems = ($range * 2)+1;
         global $paged;
         if(empty($paged)) $paged = 1;
         if($pages == '')
         {
             global $wp_query;
             $pages = $wp_query->max_num_pages;
             if(!$pages)
             {
                 $pages = 1;
             }
         }   
    
         if(1 != $pages)
         {
    
             echo "<div class=\"hidden-sm hidden-xs\"><ul class=\"tsc_pagination tsc_paginationA tsc_paginationA06\"><li><a class=\"hidden\" href=\"\">?</a></li>";
    		 echo "<li class=\"pagination-bordered\"><span>Page ".$paged." of ".$pages."</li>";
             if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<li><a href='".get_pagenum_link(1)."'>? First</a></li>";
             if($paged > 1 && $showitems < $pages) echo "<li><a href='".get_pagenum_link($paged - 1)."'>? Previous</a></li>";
             for ($i=1; $i <= $pages; $i++)
             {
                 if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
                 {
                     echo ($paged == $i)? "<li><a class=\"current\">".$i."</a></li>":"<li><a href='".get_pagenum_link($i)."' >".$i."</a></li>";
                 }
            }
    
            if ($paged < $pages && $showitems < $pages) echo "<li><a href=\"".get_pagenum_link($paged + 1)."\">Next ?</a></li>";
            if ($paged < $pages-1 &&  $paged+$range-1 < $pages && $showitems < $pages) echo "<li><a href='".get_pagenum_link($pages)."'>Last ?</a></li>";
            echo "</ul></div>\n";
    		 /* responsive */
    		echo "<div class=\"hidden-md hidden-lg\"><ul class=\"tsc_pagination tsc_paginationA tsc_paginationA06\">";
    		echo "<li><a href='".get_pagenum_link($paged - 1)."'>? Previous</a></li>";
    		echo "<li class=\"pagination-bordered\">".$paged." of ".$pages."</li>";
             echo "<li><a href=\"".get_pagenum_link($paged + 1)."\">Next ?</a></li>";
             echo "</ul></div>\n";
         }
    }

    I deactivating all plugins, and reactivating one by one.. but same.

    Thread Starter tcrmovies

    (@tcrmovies)

    I made the theme but, the pagination works on 2 websites, also on localhost, only on one website doesn’t works..

    WordPress need advance configuration on servers? or server block some function for which determine this problem?

Viewing 4 replies - 1 through 4 (of 4 total)