acub
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] Slider overlaps a sidebarYour website looks quite broken on screens wider that 768px and this is caused by a plugin called Easy Bootstrap Shortcodes.
Forum: Themes and Templates
In reply to: [Customizr] Same posts but different space between post/commentsNotice: The workaround above assumes the plugin adds the code before the page is rendered. Some plugins, however, especially bad seo plugins add code after the page has been rendered, in which case my solution won’t work. If that’s the case, you’ll need to find the “30px 30px 30px” sequence in the plugin files and replace it with “0 0 0”. Or maybe switch to another seo plugin?
It’s not that it’s badly written (I suppose it does what it claims it does, seo-wise), but it shouldn’t interfere with the page’s layout at all and it would be a plus to respect wordpress recommended coding standards, which it doesn’t.
I also modified the reply above to make my point clearer.
Forum: Themes and Templates
In reply to: [Customizr] Same posts but different space between post/commentsIt’s from Quick Adsense WordPress Plugin.
A quick workaround:add_filter('the_content', 'what_is_quick_adsense_anyway'); function what_is_quick_adsense_anyway($output) { return preg_replace('%30px 30px 30px%', '0 0 0', $output, -1); }You could ask the plugin author since when functionality plugins take up actual rendering space in the webpage? You might also introduce him to the concept of cascading style sheets, while you’re at it.
Forum: Themes and Templates
In reply to: [Customizr] Same posts but different space between post/commentsAlways provide a link to the page with the error, so we can look at the source.
Forum: Themes and Templates
In reply to: [Customizr] Slider overlaps a sidebarWe need a link to the website, lozadaOmr, so we can examine the code and see what’s causing this.
Forum: Themes and Templates
In reply to: [Customizr] customizing author archive templateCopy custom-page.php from Customizr and name it author-{id}.php in your child theme, where {id} is the auhtor’s id. You can also use the author’s username (also called nicename). So author-1.php or author-acub.php would be both valid templates for a user with id 1 or username acub.
Make your mods to the template, upload and you’re done.
Forum: Themes and Templates
In reply to: [Customizr] Feature images in postsOops. You’re right. Being a test install didn’t check first page 🙂
Here’s the working version.
add_filter('the_content', 'in_content_thumb'); function in_content_thumb($output) { ob_start(); global $post; if (has_post_thumbnail($post->ID) && (is_single() || is_page()) && !(is_home() || is_front_page() || is_admin())) { $thumb_data = TC_post_list :: tc_get_post_list_thumbnail(); TC_post_list :: tc_post_list_thumbnail( $thumb_data , 'pull-right' ); } echo $output; $return = ob_get_clean(); return $return; }And you can see it at work in here (for a while, at least – it’s a testing subdomain).
Forum: Themes and Templates
In reply to: [Customizr] Feature images in postsOk, here it is. However, the thumb will only look good if it keeps the default width/height proportions for featured images in Customizr (270 x 250):
add_filter('the_content', 'in_content_thumb'); function in_content_thumb($output) { global $post; if (has_post_thumbnail($post->ID) && (is_single() || is_page())) { $thumb_data = TC_post_list :: tc_get_post_list_thumbnail(); TC_post_list :: tc_post_list_thumbnail( $thumb_data , 'pull-right' ); echo $output; } }Forum: Themes and Templates
In reply to: [Customizr] How I can disable the glow effect ?Just replace .gallery-icon img with .gallery .gallery-icon img, for both normal and hover states, so you override the plugin stylesheet.
Forum: Themes and Templates
In reply to: [Customizr] Feature images in postsAdd the span3 class to thumb-wrapper and you’re done.
That extra div was taken from the post list. However, you’re right: it works without it, too.
Here is the answer, for anyone having a similar request as pfrainho or kinggronan.
Forum: Themes and Templates
In reply to: [Customizr] Feature images in postsadd this to your child theme’s functions.php:
add_filter('the_content', 'in_content_thumb'); function in_content_thumb($output) { global $post; if (has_post_thumbnail($post->ID) && (is_single() || is_page())) { ob_start(); the_post_thumbnail(); $image = ob_get_contents(); ob_end_clean(); return ' <div class="thumb-wrapper span3"> <div class="round-div"> </div><span class="round-div"></span>'.$image.'</div>'.$output; } return $output; }If you want it right aligned, replace “thumb-wrapper span3” with “thumb-wrapper span3 pull-right”. Optionally, you might want to add some left (or right, depending on the floating side) margin to .entry-content .thumb-wrapper through CSS, to have some padding between the content and the thumb.
Here’s a solution to have bubbles on non-commented posts in front page only. Here’s what it does: if it’s on main page, it adds 1 to the function outputting the number of comments. Than, I run a filter on the html of post headings, with the same condition, and decrease the number of comments by 1 with a preg_replace_callback. It could be extended to archives or category pages if you add is_archive(), respectively is_category() to the conditions. Just make sure you stay on post list pages, as increasing the comments number of single or singular pages will also affect the output of comments_number.
The code should go in functions.php of your child theme, so you don’t have to worry about updating Customizr.add_filter ('get_comments_number', 'plusone_comments', 10, 2); function plusone_comments($count, $post_id) { return ((is_home() || is_front_page()) ? intval($count) +1 : $count); } add_filter ('tc_content_headings', 'minusone_comments'); function minusone_comments($output) { return ((is_home() || is_front_page()) ? preg_replace_callback( '%inner">([0-9]+)<%', function($m) { return 'inner">'.(intval($m[1])-1).'<'; }, $output, -1 ) : $output); }Forum: Themes and Templates
In reply to: [Customizr] Diferent slider images for each lenguageYou could filter the slider output and change any occurence of __XX to __YY.
add_filter('tc_slider_display', 'apply_lang_filter'); function apply_lang_filter($output) { return ( qtrans_getLanguage()=='es' ? preg_replace( '%__CA%', '__ES', $output, -1 ) : $output ); }I assumed your catalan images have __CA in their name and the spanish ones have __ES in them. Change to actual strings if i assumed wrong. All this does is replacing any occurence of __CA with __ES in the html output of your slider, if current language is spanish.
This code goes in functions.php of your child theme, you don’t have to touch Customizr files, so you may keep it up to date.
Forum: Themes and Templates
In reply to: [Customizr] How I can disable the glow effect ?You meant the zooming effect? That’s controlled by transition. I thought you meant the box-shadow. There is no glow in CSS. 🙂