WordPress.org

Forums

Ridizain
Where is the loop?! (2 posts)

  1. craven222
    Member
    Posted 1 year ago #

    I feel like I'm going crazy. Where is the main loop file?

    I thought it was index.php but then I realised that even deleting everything in that file wouldn't change how my site loaded.

    I've made modifications to the output of the loop by modifying content-home.php but I want to insert a banner using the following code

    if ($count == 1){
        echo adrotate_ad(12);
        }
        if ($count == 2){
     echo adrotate_ad(106);
        }
        $count++;

    But can't figure out where to put it?

  2. Zulfikar Nore
    Member
    Theme Author

    Posted 1 year ago #

    For the blog feed the loop starts in home.php, continues in to content.php/content-{postformat}.php and finishes back in home.php. The same is true for index.php but this is only a fallback file for WordPress as home.php is used in its place.

    As a reminder all of your edits should be done in the same named files located in a child theme and not in the main theme files.

    Zulf

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic