174 pointsSerious WPMU DEV-sterI'm new here
nusolutions
Member
—
29th May 2010
Issue #1: I'd like to make it so that the section header images link to other pages. When adding the following text to the box the image doesn't appear:
If I add just the URL to the image then it appears.
Work Around:
a. Disable section header images.
b. Add extra service images.
So I check to disable the Header Section and open the services-mode.php file and copy three instances of the following text to the end of it:
<div class="sbox">
<div class="simg">
<div class="img-services">
<?php if(file_exists($upload_path . 'blogsmu4_thumb.jpg')) { ?> "><img src="<?php echo "$ttpl_path/blogsmu4_thumb.jpg"; ?>" alt="<?php echo stripslashes($tn_blogsmu_headline4); ?>" />
<?php } else { ?>
<img src="<?php bloginfo('template_directory'); ?>/_inc/images/default.jpg" alt="img" />
<?php } ?>
</div>
</div>
<h3><?php echo stripslashes($tn_blogsmu_headline4); ?></h3>
<p>
<?php if($tn_blogsmu_text4 == ""){ ?>
<?php _e('You can replace this area with a new text in your theme options and upload and crop new images to replace the image you can see here already.', TEMPLATE_DOMAIN); ?>
<?php } else { ?>
<?php
$com_short = $tn_blogsmu_text4;
$chars = 200;
$com_short = $com_short . " ";
$com_short = substr($com_short,0,$chars);
$com_short = substr($com_short,0,strrpos($com_short,' '));
$com_short = $com_short . "...";
?>
<?php echo stripslashes($com_short); ?>
<?php } ?>
<span class="learn-more">"><?php _e("Find out more", TEMPLATE_DOMAIN); ?></span>
</p>
</div>
This adds the images to the front page but I can't figure out how to get the options to appear on the backend. I don't want to use Post-mode so I'm wondering if it's as simple as copying additional lines of code. The "services-function.php" file looks interesting but I'm not 100% sure so I figure I'd ask.
Issue #1: I'd like to make it so that the section header images link to other pages. When adding the following text to the box the image doesn't appear:
If I add just the URL to the image then it appears.
Work Around:
a. Disable section header images.
b. Add extra service images.
So I check to disable the Header Section and open the services-mode.php file and copy three instances of the following text to the end of it:
<div class="sbox">
<div class="simg">
<div class="img-services">
<?php if(file_exists($upload_path . 'blogsmu4_thumb.jpg')) { ?> "><img src="<?php echo "$ttpl_path/blogsmu4_thumb.jpg"; ?>" alt="<?php echo stripslashes($tn_blogsmu_headline4); ?>" />
<?php } else { ?>
<img src="<?php bloginfo('template_directory'); ?>/_inc/images/default.jpg" alt="img" />
<?php } ?>
</div>
</div>
<h3><?php echo stripslashes($tn_blogsmu_headline4); ?></h3>
<p>
<?php if($tn_blogsmu_text4 == ""){ ?>
<?php _e('You can replace this area with a new text in your theme options and upload and crop new images to replace the image you can see here already.', TEMPLATE_DOMAIN); ?>
<?php } else { ?>
<?php
$com_short = $tn_blogsmu_text4;
$chars = 200;
$com_short = $com_short . " ";
$com_short = substr($com_short,0,$chars);
$com_short = substr($com_short,0,strrpos($com_short,' '));
$com_short = $com_short . "...";
?>
<?php echo stripslashes($com_short); ?>
<?php } ?>
<span class="learn-more">"><?php _e("Find out more", TEMPLATE_DOMAIN); ?></span>
</p>
</div>
This adds the images to the front page but I can't figure out how to get the options to appear on the backend. I don't want to use Post-mode so I'm wondering if it's as simple as copying additional lines of code. The "services-function.php" file looks interesting but I'm not 100% sure so I figure I'd ask.
OK, you kind of confused my by posting up the contents of the file. I'm not sure that I understand what you are trying to do.
You are speaking of the top Section Settings, correct?
The images may not appear because I don't think that area is 300px wide. The second thing is, if you adding text in the box as well as the image code, you need to adjust the character restriction to a higher number. ($chars = 200;)
Other than that, it should work. I have my images wrapped with text, so I sized them at 135x90 and set my characters to 500.
Awesome tip!! Increasing the char size did the trick and I didn't have to shrink my images!! With this in place I'm no longer concerned with adding extra images to the services area.
Responses (3)
Member — 29th May 2010 #
OK, you kind of confused my by posting up the contents of the file. I'm not sure that I understand what you are trying to do.
You are speaking of the top Section Settings, correct?
The images may not appear because I don't think that area is 300px wide. The second thing is, if you adding text in the box as well as the image code, you need to adjust the character restriction to a higher number. ($chars = 200;)
Other than that, it should work. I have my images wrapped with text, so I sized them at 135x90 and set my characters to 500.
Member — 30th May 2010 #
Awesome tip!! Increasing the char size did the trick and I didn't have to shrink my images!! With this in place I'm no longer concerned with adding extra images to the services area.
Thanks
Member — 30th May 2010 #
Cool. Glad it worked out.
Become a member