• CodeRookie

    (@coderookie)


    On my previous theme that I was customizing, I wanted to insert an ad banner into a wordpress theme home page footer. Below is the original code at the end of the home page php template.

    </article>
    <?php
            if ($i  % 3 == 2) { echo '</div>'; }
            $i++;
            endwhile;
            if ($cb_closer == true) {echo '</div>';}
            cb_page_navi();
            endif;
    ?>

    I figured out I can achieve this by inserting my ad like below. I did that and it worked like a charm.

    ?> insert ad code here <?php cb_page_navi();

    Now I need to achieve same for a new theme that has following home page php code at the bottom. I tried above method but it did not work.

    </article>
    
    <?php
            $cb_count++;
            endwhile;
            cb_page_navi( $cb_qry );
            endif;
    ?>

    Can someone please help how to ad my banner code on footer above pagination?

The topic ‘Please help me insert this code in a wordpress php theme file.’ is closed to new replies.