Elements
Source Code
Welcome to Docy ! Get familiar with the Docy products and explore their features, guides, tips and tools.
HTML Code Blocks
From a group of elements with one parent. Same as first one, but use this method if you are creating a popup from a list of elements in one container. Note that this method does not enable gallery mode, it just reduces the number of click event handlers; each item will be opened as a single popup. If you wish to enable gallery, add the gallery:{enabled:true} option.
For example, <code><section></code> should be wrapped as inline.
query('cat=-6,-5&showposts=4'.'&paged='.$paged);
?>
Category: News
max_num_pages);
} ?>
query('cat=-6,-5&showposts=4'.'&paged='.$paged);
?>
Category: News
max_num_pages);
} ?>
query('cat=-6,-5&showposts=4'.'&paged='.$paged);
?>
Category: News
max_num_pages);
} ?>
CSS Source Code
/*Pagination Start*/
.pagination-outter{
background: #000000;
display: table;
width: 100%;
}
.pagination-inner {
border: 1px solid;
margin-left: auto;
margin-right: auto;
width: 1056px;
}
.pagination {
clear: both;
display: table;
font-size: 11px;
line-height: 13px;
position: relative;
}
.pagination span, .pagination a {
display:block;
float:left;
margin: 2px 2px 2px 0;
padding:6px 9px 5px 9px;
text-decoration:none;
width:auto;
color:#fff;
background: #555;
}
.pagination a:hover{
color:#fff;
background: #3279BB;
}
.pagination .current{
padding:6px 9px 5px 9px;
background: #3279BB;
color:#fff;
}
/*pagination end*/
/*Pagination Start*/
.pagination-outter{
background: #000000;
display: table;
width: 100%;
}
.pagination-inner {
border: 1px solid;
margin-left: auto;
margin-right: auto;
width: 1056px;
}
.pagination {
clear: both;
display: table;
font-size: 11px;
line-height: 13px;
position: relative;
}
.pagination span, .pagination a {
display:block;
float:left;
margin: 2px 2px 2px 0;
padding:6px 9px 5px 9px;
text-decoration:none;
width:auto;
color:#fff;
background: #555;
}
.pagination a:hover{
color:#fff;
background: #3279BB;
}
.pagination .current{
padding:6px 9px 5px 9px;
background: #3279BB;
color:#fff;
}
/*pagination end*/
/*Pagination Start*/
.pagination-outter{
background: #000000;
display: table;
width: 100%;
}
.pagination-inner {
border: 1px solid;
margin-left: auto;
margin-right: auto;
width: 1056px;
}
.pagination {
clear: both;
display: table;
font-size: 11px;
line-height: 13px;
position: relative;
}
.pagination span, .pagination a {
display:block;
float:left;
margin: 2px 2px 2px 0;
padding:6px 9px 5px 9px;
text-decoration:none;
width:auto;
color:#fff;
background: #555;
}
.pagination a:hover{
color:#fff;
background: #3279BB;
}
.pagination .current{
padding:6px 9px 5px 9px;
background: #3279BB;
color:#fff;
}
/*pagination end*/
JavaScript Code
PHP Source Code
// Pagination Start//
function 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 "Page ".$paged." of ".$pages."";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "« First";
if($paged > 1 && $showitems < $pages) echo "‹ Previous";
for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
echo ($paged == $i)? "".$i."":"".$i."";
}
}
if ($paged < $pages && $showitems < $pages) echo "Next ›";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Last »";
echo "n";
}
}
// Pagination End//
// Pagination Start//
function 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 "Page ".$paged." of ".$pages."";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "« First";
if($paged > 1 && $showitems < $pages) echo "‹ Previous";
for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
echo ($paged == $i)? "".$i."":"".$i."";
}
}
if ($paged < $pages && $showitems < $pages) echo "Next ›";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Last »";
echo "n";
}
}
// Pagination End//
// Pagination Start//
function 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 "Page ".$paged." of ".$pages."";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "« First";
if($paged > 1 && $showitems < $pages) echo "‹ Previous";
for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
echo ($paged == $i)? "".$i."":"".$i."";
}
}
if ($paged < $pages && $showitems < $pages) echo "Next ›";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Last »";
echo "n";
}
}
// Pagination End//
3 Comment
Issac Wise
Wouldn’t it be better practice to use get_the_title(..) in this case? directly accessing the post object’s data member would bypass applying filters and enforcing protected and private settings, unless that’s explicitly desired.
ReplyHans Down
Thenks Demo User for Wouldn’t it be better practice to use get_the_title.
ReplyHans Down
Dropped a clanger up the kyver easy peasy vagabond victoria sponge Charles tinkety tonk old fruit argy.!
ReplyChauffina Carr
Wouldn’t it be better practice to use get_the_title(..) in this case? directly accessing the post object’s data member would bypass applying filters and enforcing protected and private settings, unless that’s explicitly desired.
Reply