Support » Themes and Templates » [Resolved] Creativix Theme: Placing ads on the frontpage

[Resolved] Creativix Theme: Placing ads on the frontpage

  • I am playing around with Adsense and other ad suppliers. They all talk about copying and pasting the code onto the HTML page. However, I can’t figure out where the HTML page is to place ads on the “frontpage” of my Creativix Theme. Can someone show me how to place ads onto the “frontpage” or where the HTML for the “frontpage” is?


Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Andrew Nevins


    Forum moderator

    There is no HTML page, you have a php pages intermixed with php and html. Some html is already there and others will be generated by php. If you targeting just the frontpage, look for home.php

    Again you can create a child theme or you can risk can just change the main file.


    Will it stay there permenantly if i were to place it on the main file? If I want the ad placed directly below the slide and another directly below the articles, how do I code it that way with the preset code that I get from the ad supplier?

    It will stay there as long as you ethier create a child theme or do not update your theme. Can’t tell you where to put it since I don’t know what your theme is nor can I see your code.


    Theme is Creativix, would you know by chance which php I can try to put the ad code in and in between? I do not see a home.php. This is the list I see:

    404 Template
    Theme Functions
    Main Index Template
    Page Template
    Search Results
    Single Post
    Blog Page Template
    No Sidebar Page Template
    Portfolio Page Template


    Moderator Michael


    Forum Moderator

    try to add the bottom adsense block before this line in index.php:

    <?php get_footer(); ?>


    I placed a “skyscraper” below that line in hopes that it would fill the gap to the right of the articles but it didn’t quite work. However, I was able to place a “leaderboard” in between the the two bodies. But it is not centered. The code I inserted is below. Would you guys know the code i can type in to center it on the page? If so, where do I insert it within the code? youandthekids.com

    <script type="text/javascript"><!--
    google_ad_client = "ca-pub-6461945321126128";
    /* leaderboard 728x90 */
    google_ad_slot = "4346136366";
    google_ad_width = 728;
    google_ad_height = 90;
    <script type="text/javascript"

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

    Moderator Michael


    Forum Moderator

    the code i can type in to center it on the page

    one possibility is to wrap the adsense code into a div;


    <div class="ads">

    and add in style.css:

    .ads { text-align: center; }


    Does it matter where I place the div within the ad code? Beginning or end of the code? Where in style.css do I place the text align code?

    Moderator Michael


    Forum Moderator

    Does it matter where I place the div within the ad code?

    yes – look at the example; the div wraps around the adcode.

    the location in style.css does not matter, as this is a new css class.


    I finally had a chance to give it a shot…and it worked. Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] Creativix Theme: Placing ads on the frontpage’ is closed to new replies.