loop.php file

salam,
i want to add simple pagination to my website with dazzling theme but the plugin simple pagination required a modification in loop.php file but i don’t find this file in dazzling so what can i do now??
thanks

Hi Salam,

I hope you are well today and thank you for your question.

I think you are using the following Simple Pagination plugin.

This plugin needs to edit the theme file which uses next_posts_link() and previous_posts_link() functions. Usually these functions are stored the loop.php file but not necessary.

In our Dazzling theme we have used these functions in the following Dazzling theme file in the custom function dazzling_paging_nav()

/dazzling/inc/template-tags.php

You don’t need to edit this file directly instead you can just copy paste the custom function dazzling_paging_nav() in your child theme and replace the functions next_posts_link() and previous_posts_link() with the following code.

<?php if(function_exists('wp_simple_pagination')) {
    wp_simple_pagination();
} ?> 

I have attached the child theme where i have replaced these functions so you can just install it and use it by activating.

Best Regards,
Movin

Salam movin :slight_smile:
first of all, Thank you for your hospitality :wink:
ok so do i just install the child-theme21.zip only without editing the files and functions?
i’m debutant with wordpress and i never try the child-theme technic, i will search about it
thanks very very well dear movin and thank you again for your help :slight_smile:

salam

Hi @assidoc,

Yes you should just use the child theme and you will find more information about child theme on the following page.

https://codex.wordpress.org/Child_Themes

Regards,
Movin