maccoutinho
Forum Replies Created
-
I’d like to know how to do this too because I want to define a max image height and width with phpthumb. Can anyone help?
Forum: Plugins
In reply to: wp_list_categories: highlight current category when viewing single post (v2)Sorry, here goes:
<?php $catsy = get_the_category(); $myCat = $catsy[0]->cat_ID; $CatwCount = wp_list_categories('hierarchical=1&use_desc_for_title=0&orderby=name&title_li=&show_count=1&echo=0&depth=2¤t_category='.$myCat); $CatwCount = ereg_replace(' \(([0-9]+)\)', ' <span class="count">[\\1]</span>', $CatwCount); echo $CatwCount; ?>
Forum: Plugins
In reply to: Retrieving parent and child category in single.php – bug, need helpLink to code: https://pastebin.com/7CD0LMSR
Forum: Themes and Templates
In reply to: How to only show the post's child category inside the loop?I’m trying to show only the sub-categories that belong to the current post on single.php and came across this code. Unfortunately this code displays the sub-categories belonging to all posts and not just the current one. Can anyone give me some pointers on what to achieve what I’m looking for? Thanks!
Forum: Themes and Templates
In reply to: Changing background image for each pageFixed:
<?php
$number = get_post_meta($post->ID, ‘background-image’, true);
if ( $number ) {
?>
<style type=”text/css”> body { background-image: url(<?php bloginfo(‘template_url’); ?><?php echo get_post_meta($post->ID, ‘background-image’, true); ?>); background-color: <?php echo get_post_meta($post->ID, ‘background-color’, true); ?>; } </style>
<?php } // end if statement
// if there’s no img do replace it with no-img
else { ?>
<style type=”text/css”> body { background-image: url(<?php bloginfo(‘template_url’); ?>/images/ground01.png);
background-color:#aa4339; } </style>
<?php } ?>Thnx to this guy.
Forum: Themes and Templates
In reply to: Changing background image for each pageActually this last code doesn’t work, it always displays the default image. What am I doing wrong?
Forum: Themes and Templates
In reply to: Changing background image for each pageWell, I searched a bit and got that too, just added this:
<?php
$values = get_post_custom_values(“background-image”); // set the img custom name
if (isset($values[0])) { // if there’s a img in my custom field
?>
<style type=”text/css”> body { background-image: url(<?php bloginfo(‘template_url’); ?><?php echo get_post_meta($post->ID, ‘background-image’, true); ?>); background-color: <?php echo get_post_meta($post->ID, ‘background-color’, true); ?>; } </style>
<?php } // end if statement
// if there’s no img do replace it with no-img
else { ?>
<style type=”text/css”> body { background-image: url(<?php bloginfo(‘template_url’); ?>/images/ground01.png);
background-color:#aa4339; } </style>
<?php } ?>Based it on:
this postForum: Themes and Templates
In reply to: Changing background image for each pageWell, since we’re at it, can someone help me add an if else statement to display a default image in case I don’t define the custom fields?
Thanks!
Forum: Themes and Templates
In reply to: Changing background image for each pageCrap, I was missing a ) in front of the image url.
Well, I hope this method helps someone!Forum: Fixing WordPress
In reply to: [Plugin: Shadowbox JS] Doesn’t work with Internet Explorer 8.0 RC1.Lets wait and see then… thnx for your reply.
Forum: Fixing WordPress
In reply to: [Plugin: Shadowbox JS] Doesn’t work with Internet Explorer 8.0 RC1.(The background fades to black but no window pops up.)
Forum: Plugins
In reply to: [Plugin: Shadowbox JS] Not Working with Internet Explorer 8.0 RC1Oops, this should have been posted in Troubleshooting… sorry for that. I’ll post it again.
I fixed it, don’t really know how. I basically just removed an area code I had inserted has default text on my telephone number field. And I also added my recipient name besides the e-mail like:
To:
Name Here <[email protected]>
Don’t know what actually fixed it but I’m betting it was the second part.
My form is hosted at: https://www.maccoutinho.com/instant/?page_id=13