Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter princewap

    (@princewap)

    i gave got the code from the below article in my previous theme ribosom it was working but not working in basic

    1. Login to your WordPress administration panel
    2. Select Presentation ->Theme Editor from the navigation menu
    3. On the Theme Editor page, you will see a list of “theme files” to the right of the page. Select the “Main index template” (index.php).
    4. Find the following line
    <?php while (have_posts()) : the_post(); ?>
    5. Above it add the following line
    <?php $count = 1; ?>
    Comments:-$count is the variable and you have to assign a value to that variable. In this case the value is 1.
    6. Find the line <?php endwhile; ?>
    7. Add the following code directly above it (replace AdSense Code with your code)

    <?php if ($count == 1) : ?>
    AdSense Code 1
    <?php elseif ($count == 2) : ?>
    AdSense Code 2
    <?php endif; $count++; ?>

    Comment:-We can count how many times the loop has cycled by adding the block of code above. Remember at the start we added <?php $count = 1; ?>, well above we check $count, if count is 1 we place adsense code 1, if its 2 we place adsense code 2.NOTE : To change which post your Adsense is placed under, simply change the count number, for example: $count == 2 will place the Adsense under post 2
    8. Find the line <?php endwhile; ?>
    9. Below it add the following code:

    <?php if ($count != 2 AND $count != 3 ) : ?>
    Adsense Code 3
    <?php endif; ?>

    Comment:-The adsense will be added after the very last post on the home page because it’s been added after <?php endwhile; ?>It also tells us that if the adove 2 ads are not the last ads than add Google Adsense Code 3 at the end.
    10. Click Save, then go view your site to confirm that the Adsense has been added to the first post listing on your home page. Note – if you want the same thing to show on the category or archive pages then that’s easy. You just need to copy and paste what you ‘ve done to either your archive.php or category.php.

    Thread Starter princewap

    (@princewap)

    it is showing search box above site title/logo but i want to show search box in right site of site title/logoi tried to change add action according to it also but not working please help me out

    Thread Starter princewap

    (@princewap)

    please somebody help me

    Thread Starter princewap

    (@princewap)

    please reply asap i have to use it in my site

    Thread Starter princewap

    (@princewap)

    ok thanks,
    one more issue i am trying to add pagination with numbering from the codes given in this site https://www.3nions.com/how-to-add-numeric-pagination-in-your-wordpress-theme/ in my previous theme like nisarg it was working fine but in ribosome css is not working only it showing numbers with a black dot and pagination works fine but my problem is css please tell me what i do so that the pagination show numbers in css?

    Thread Starter princewap

    (@princewap)

    https://www.funcolors.in my site link i dont knoe whats going wrong currently i am using v1.4.8 but as i update it to latest version side bar and footer not show please help what i do
    And i am using a widget to show php and java script code in side bar and nothing i am using in footer exapt simple links

Viewing 6 replies - 1 through 6 (of 6 total)