Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

  • Profile
  • Topics Started
  • Replies Created
  • Favorites

Forum Replies Created

  • 8 years, 6 months ago Logismkt
    Participant

    Expired

    in reply to: Widget Titles – heading tags

    Hello Mihaila,

    Thanks for your answer. It helped to solve my problem.

    This is my site link: https://www.logismarket.es/blog/

    Regards.

    8 years, 6 months ago Logismkt
    Participant

    Expired

    in reply to: Add a sidebar widget to Category Pages

    Awesome.

    This solved my problem.

    The Blog Config wasn’t the best to show the widgets.

    Thanks.

    8 years, 7 months ago Logismkt
    Participant

    Expired

    in reply to: Pagination: Header Link rel="prev" & rel="next"

    Hi,

    The most important reason to implement the pagination atrributes (rel=”next” / “prev”) concerns to the page indexing and avoid content duplication.

    This is the way to give some of context to our content and connection between URLs.

    Read more about this on this Google’s page.

    So… To implement this on the Pagination Function of Tower theme, you need to:

    – Access to the functions-tower.php (wp-content/themes/tower/)

    – At 19’s line start the “Pagination Function”

    – Add variables and code to print this “link tags” (the code added is bold styled)

    /*--------------------- Pagination Function ---------------------------------- */
    
    function codeless_pagination($pages = '', $range = 2){
    
    $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;
    
    }
    
    }

    //VARIABLES TO IMPLEMENT THE LINK REL PREV Y NEXT

     $actualPage = $paged;
    
    $previousPage = $actualPage - 1;
    
    $nextPage = $actualPage + 1;
    
    if(1 != $pages)
    
    { 

    // CODE TO PRINT LINK REL PREV Y NEXT BASED ON FIRST PAGE, LAST PAGE AND OTHERS

    if ($paged == $pages) {
    
    echo '';
    
    } else if ($actualPage == 1) {
    
    echo '';
    
    } else {
    
    echo '';
    
    echo ''; }
    
    echo "
    
    Page ".esc_attr($paged)." of ".esc_attr($pages)."";
    
    if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "«"; if($paged > 1 && $showitems < $pages) echo "‹";
    
    for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    
    { $next_link = '';
    
    if($paged + 1 == $i)
    
    $next_link = 'next_link';
    
    echo ($paged == $i)? "".$i."":"".$i."";
    
    }
    
    }
    
    if ($paged < $pages && $showitems < $pages) echo "›";
    
    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "»";
    
    echo "
    
    \n"; }
    
    }
    
    /*--------------------- End Pagination Function ---------------------------------- */
    

    Hope this results usefull for the community.

    Regards,

    Frederico Metelo.

    • This reply was modified 8 years, 7 months ago by Mirela. Reason: code styling
    8 years, 7 months ago Logismkt
    Participant

    Expired

    in reply to: Pagination: Header Link rel="prev" & rel="next"

    Hi,

    I’ve found the solution. Do you allow me to present this solution in this post to help others?

    Thanks.

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

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password