Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] How to add banner above the slider? (http://forum.bytesforall.com/showthread.php?t=23235)

AsianStarsID Jul 2, 2015 12:33 AM

[SOLVED] How to add banner above the slider?
 
This is my site: http://asianstarsid.com/

I want the same banner (that is currently below the slider and in the footer) between the slider and the grey area that says Blog. How do I do that?

CrouchingBruin Jul 2, 2015 02:50 AM

Looks like you already figured it out, because I see the same banner above and below the slider.

AsianStarsID Jul 2, 2015 10:00 AM

I guess it takes a while for the banner to appear after the change, but the banner that I had on the footer disappeared. How do I include that?

juggledad Jul 2, 2015 12:22 PM

I see ad's in all three sites, though the site loads slow, you might reduce the number of posts being shown.

AsianStarsID Jul 3, 2015 10:46 PM

ok thx for the tip. how do i put ads between the 2nd and 4th post?

CrouchingBruin Jul 4, 2015 02:27 AM

Quote:

ok thx for the tip. how do i put ads between the 2nd and 4th post?
Do you mean an ad before the third post and an ad after the third post?

Take a look at this thread. You should be able to use jQuery to position your ads after certain posts.

AsianStarsID Jul 4, 2015 08:03 PM

i'm trying to put an ad before the 3rd post

added this to index.php like in the above thread:
<div class="Ads_Widget"><?php dynamic_sidebar( 'Ads_firstpost_widget' ); ?></div>

Bottom field:

<script>
jQuery(document).ready(function($){

// Make a copy of the Ads DIV and insert it after the second post
$(".type-post:second").after($(".Ads_Widget").clone());

// Remove the last ad widget from its current location
$(".Ads_Widget:last").remove();

});
</script>

the ad shows up after the last post. what am i doing wrong?

juggledad Jul 5, 2015 07:14 AM

Where did you come up with the selector "second"?

Try changing the ".type-post:second" to something that is valid. There is a solution, you need to use "div.type-post:xxxxxxxx" where xxxxxxxx is a valid selector.

Now for your homework. Go to http://www.w3schools.com/jquery/jque..._selectors.asp and find a selector that will work.

CrouchingBruin Jul 8, 2015 10:32 AM

Congratulations, it looks like you got it to work. In fact, I now see two ad banners between your posts.

AsianStarsID Jul 11, 2015 07:20 PM

Thanks, I got the ads to work. Another question, how do I place ads at the bottom of the comments section?

For clarification, I want something like this page: http://www.allkpop.com/article/2015/...iu-jypark-more

There's an ad above the "The End" label.

AsianStarsID Jul 11, 2015 07:38 PM

Oh, how do you get ads above and below the comment box?

AsianStarsID Jul 11, 2015 10:03 PM

Where do I place interstitial and popunder ads? Do I need separate widgets for those?

juggledad Jul 12, 2015 10:06 AM

Just add a widget area where you want the ad.

However, I'd advise about putting in too many ad's.
1) If a site has more than a couple, people get annoyed (I never go back to a site with too many)
2) I don't look at the ad's on sites anyway and
3) too many ad's will slow the load of the site and prople won't come back

CrouchingBruin Jul 13, 2015 12:31 AM

As Juggledad mentioned, just place a new widget area where you want the ad to appear. You have already modified index.php, which displays the blog page (and any archive page). The other two main templates that you want to look at are:
  1. single.php - this main template is used to display a single post.
  2. page.php - this main template is used to display a non-post page.
This code line displays the comment section:
Code:

<?php comments_template( '', true ); ?>
So place your new widget area either before or after this line, or in both places.

For interstitial or pop-under ads, if all you need to do is insert some JavaScript, then just add a text widget to one of your existing widget areas and insert your JavaScript into it (leave the title blank so the widget itself doesn't show up in the widget area).

I will echo Juggledad's concern that sites which display a lot of ads usually don't get a lot of repeat visitors, especially if the ads make it difficult to navigate the site. For example, I tried going to one of your posts and it took me three tries to get there because I kept getting pop-ups instead of the post the first two times.

AsianStarsID Jul 14, 2015 06:27 PM

ok i will test different ads and see over the next week.

is there anyway to change the size of the featured image that appears before you click on the full post? Right now it's 620x180 and I always include the person's face but sometimes I feel the image size is not big enough and is there any plugin that can crop photos in that ratio in an instant and make it clear? Right now I am using Post Thumbnail Editor to make featured images but the image doesn't show up anywhere near HD quality.

lmilesw Jul 15, 2015 02:11 PM

Also when I go to your site I get a malicious script warning.

CrouchingBruin Jul 15, 2015 11:20 PM

The latest version of Montezuma added support for the the_post_thumbnail() function.

Go to your index.php sub-template and you should see this line:
Code:

<?php bfa_thumb( 620, 180, true, '<div class="thumb-shadow"><div class="post-thumb">', '</div></div>' ); ?>
This line of code displays the thumbnail in the 620x180 px dimensions, although, as you've noticed, it's a low resolution image (loads faster).

You can use the the_post_thumbnail() function instead, which should enable you to use a higher resolution thumbnail:
Code:

<?php the_post_thumbnail(); ?>
If you want the same grayscale-to-color effect, then surround that line of code with the thumb-shadow and post-thumb <div>s like this:
Code:

<div class="thumb-shadow"><div class="post-thumb">
          <?php the_post_thumbnail(); ?>
</div></div>

Please consult the Wordpress codex on the the_post_thumbnail() function to see additional parameters which you can pass to the function, for example, how to pick a particular thumbnail size.

If you also want your visitors to be able to click on the thumbnail to go to the post, look up a few lines in index.php and you should see the code for displaying the permalink anchor, which you can copy to surround the thumbnail.

AsianStarsID Jul 17, 2015 09:31 AM

thanks i will look into that. i saw this in a couple of my posts in the front page. how do i fix this?

http://i.imgur.com/NtARtma.png

CrouchingBruin Jul 17, 2015 03:03 PM

The Comments string is coming from your Disqus comment plugin.
  1. Sign in to your Disqus account.
  2. Once you sign in, in the upper right corner of the screen will be a gear icon that you can click for Settings. Click on the gear and click on the Admin menu item.
  3. Click the Settings menu item and select your site.
  4. In the section labeled Comment Count Link, take out the word Comments or Comment from all three fields (leave behind 0, 1, and {num}) and click the [b]Save Changes button at the very bottom.

AsianStarsID Jul 27, 2015 01:36 PM

Thanks, fixed it. how do i make a mobile version of my site?

lmilesw Jul 28, 2015 11:24 AM

Montezuma is responsive. Nothing needs to be done.

CrouchingBruin Jul 28, 2015 01:04 PM

As Larry mentioned, the Montezuma theme is responsive so it should look fine on a mobile device. However, the two banner ads at the top of the site and the one banner ad in the footer are keeping the page from sizing properly because they have their width set to 728px. So, you can either change the banner ads to something that's narrower, or you can add a media query in your CSS to hide them when the screen width is the size of a cell phone:
Code:

/* Hide banner ads when screen width goes below 420px */
@media only screen and (max-width: 420px) {
  #text-14, #text-16, #text-17 {
              display: none;
  }
}

You might also be able to find some sort of banner ad that is responsive to replace them.

AsianStarsID Jul 29, 2015 12:35 AM

how do I hide the mobile ads on desktop?

AsianStarsID Jul 29, 2015 12:53 AM

I'm currently using the Advanced Ads plugin to hide the mobile ads on the desktop theme. is it better this way because i don't know code?

CrouchingBruin Jul 29, 2015 02:31 AM

I would say that if the plugin works, then it's fine to use.


All times are GMT -6. The time now is 06:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.