WordPress.org

Ready to get started?Download WordPress

Forums

raindrops
[resolved] Put advertisements in and above the h2 class (9 posts)

  1. IamPetard
    Member
    Posted 10 months ago #

    Me again! I'm having trouble adding google ads next to the title of the h2 class - see HERE

    On pages I want the ads to be next to the title, aligned to the right like in the picture
    On posts, categories and tags, I would like them to be above the title and aligned to the right.

    I would also like to remove the Tag and Category Archive title so it should look something like THIS

    I hope I'm not being annoying and asking too much but I have no clue how to make this work, still learning how to do all of this :D

  2. nobita
    Member
    Theme Author

    Posted 10 months ago #

    Hi IamPetard

    Please try below

    For example
    Page
    page.php

    <div class="entry page">
              				<<?php raindrops_doctype_elements( 'div', 'article' );?> id="post-<?php the_ID( ); ?>" <?php raindrops_post_class( );?>>
    
    <?php

    change below

    <div class="entry page">
              				<<?php raindrops_doctype_elements( 'div', 'article' );?> id="post-<?php the_ID( ); ?>" <?php raindrops_post_class( );?>>
    <?php get_template_part( 'banner','page' ); ?>
    <?php

    Create a banner-page.php

    <!-- Your banner start-->
    <div class="banner page">
    <img src="" alt="page banner" />
    </div>
    <!-- Your banner end-->

    Category and Tag
    loop.php line:15

    if ( have_posts( ) ) {
    
    			raindrops_loop_title( );

    Change below

    if ( have_posts( ) ) {
    
    			if( is_archive() and ( is_tag() or is_category() ) ) {
    
    				get_template_part( 'banner','category' );
    			}else{
    
    				raindrops_loop_title( );
    			}

    Create banner-category.php

    <div class="banner page">
    <img src="" alt="page banner" />
    </div>

    Since banner advertising has not corresponded to Responsive layout in many cases, please work carefully.

    Thank you.

  3. IamPetard
    Member
    Posted 10 months ago #

    Awesome stuff! The pages, categories and tags are working awesomely however the home page and the posts aren't displaying anything.

    I would like the home page to display the same way it is in my first image in my first post. (possibly make it display next to the Home title, not above it)
    As for the posts, same as pages categories and tags would be great.

    My home page is a static page on a brank front template, if that makes a difference.

    I've been trying the last 45 minutes to do it with the help of your code but I can't really understand which files to edit :(

    Can you do that almighty Nobita? :D

  4. nobita
    Member
    Theme Author

    Posted 10 months ago #

    possibly make it display next to the Home title, not above it

    Home title is Site Title or blank front pege title ?

    If possible, please be shown by a picture.

    Thank you.

  5. IamPetard
    Member
    Posted 10 months ago #

    This is the website.

    This is what I would like.

    It is a blank front page title in the h2 entry title class, I'm wondering is it possible to put the banner within that h2 entry title. I wasn't able to do it myself.
    Maybe put the h2 entry title into a container where 20% is for the Home title and 80% is for the banner, but I haven't been able to make it work.

  6. nobita
    Member
    Theme Author

    Posted 10 months ago #

    Maybe put the h2 entry title into a container where 20% is for the Home title and 80% is for the banner

    Sorry Raindrops support layout class 25% : 75%
    http://developer.yahoo.com/yui/examples/grids/grids-gf.html

    loop.php line:80

    <?php
    					raindrops_entry_title( );
    ?>

    Change below

    <?php
    			if( is_front_page() ) {
    
    				get_template_part( 'banner','home' );
    			} else {
    					raindrops_entry_title( );
    			}
    ?>

    banner-home.php

    <div class="yui-gf banner home">
    
    	<div class="yui-u first">
        <?php raindrops_entry_title( );?>
    	</div>
    
    	<div class="yui-u">
      		<img src="http://192.168.1.31/local-wp/wp-content/uploads/2013/08/728-90.png" alt="home banner" />
    	</div>
    
    </div>

    style.css

    add to last line

    .banner.home img{
    	max-width:100%;
    }
    
    @media screen and (max-width : 640px){
    
    	.banner.home .yui-u{
    		width:100%;
    		display:block;
    		float:none;
    	}
    }

    Thank you.

  7. nobita
    Member
    Theme Author

    Posted 10 months ago #

    Since it was insufficient information, it corrects.

    <div class="yui-gf banner home">
    
    	<div class="yui-u first">
        <?php raindrops_entry_title( );?>
          </u>
    	</div>
    
    	<div class="yui-u">
      		<img src="http://192.168.1.31/local-wp/wp-content/uploads/2013/08/728-90.png" alt="home banner" />
    	</div>
    
    </div>
    <ul class="index">

    banner-category.php

    <div class="banner page">
    <img src="" alt="page banner" />
    </div>
    <ul class="index">
  8. IamPetard
    Member
    Posted 10 months ago #

    Excellent! This works perfectly. Thanks a bunch!

    I also have one more question but I'm not sure should I make a new post - I want the header image to have custom places where you can click(if you look at my image you see there are a few possible places to click - HERE

    Should I make a new post or can you quickly tell me can this be done?

  9. nobita
    Member
    Theme Author

    Posted 10 months ago #

    Please make a new post

    Thank you

Reply

You must log in to post.

About this Theme

About this Topic