acub
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] How to add jpg watermarks in all pagesYes it can be done.
1. Create a child theme if you don’t already have one.
2. In functions.php of your child theme, add the following code:add_action('get_footer', 'insert_bottom_background'); function insert_bottom_background() { echo '<div class="bottom-background"></div>'; }3. In style.css of your child theme, add the following code (assuming your images are called top_background.png and bottom_background.png and are both placed in the folder img, in your child theme’s folder. I also assumed your bottom background image is 60px high. If it’s higher or lower, modify the height declaration of .bottom-background in the code below):
#main-wrapper {background: transparent url('img/top_background.png') no-repeat center top;} .bottom-background {background: transparent url('img/bottom_background.png') no-repeat center top; height: 60px;}Forum: Themes and Templates
In reply to: [Customizr] Adding privacy & terms in class-main-footer.phpOn line 91 of class-main-footer.php, before </div>, insert your html code. This is an example:
<p> · <a href="/conditions" title="Terms & Conditions">Terms & Conditions</a> · <a href="/privacy" title="Privacy">Privacy</a> · </p>Change the hrefs, titles and texts of the anchors to whatever you need. The middots are just for design, to mimic the style of the rest of footer content. If you want them on different rows insert a
<br />between the links.
Forum: Themes and Templates
In reply to: [Customizr] Adding privacy & terms in class-main-footer.phpCopy /customizr/parts/class-main-footer.php to [your child theme]/parts/class-main-footer.php and modify it to suit your needs. Save & upload. It will have priority over the one in the parent theme and it will be kept over future upgrades of Customizr.
I’m sorry, I cannot answer that question. A temporary solution is to make the mods in your child theme until they’re no longer needed.
Right now the code is incomplete, as it doesn’t cover excerpts for featured pages. You can only have multilingual content for featured pages descriptions using the custom fields in the Customizr options panel. I’ll look into this over the next few days and as soon as I find a solution I’ll send Nikeo the result. Hopefully it will be included in the next release.
Forum: Themes and Templates
In reply to: [Customizr] Show featured images in blog posts?The simple way of adding the featured image to the post is to add the result of
if ( has_post_thumbnail() ) { the_post_thumbnail(); }into it. Everything else I did (in the first answer) was feed the function size and class arguments.
You either create a shortcode and add it in functions.php, as I did above, or you install a plugin that allows you to input php in your post. Full documentation here.
Forum: Themes and Templates
In reply to: [Customizr] Show featured images in blog posts?On further testing I realized my solution only works on pages if you want the circles effect, not on single posts or custom post types.
Played with it a bit, realized where the limitation is from and here’s the working solution. Again, it’s your job to build the custom CSS around your classes to make it display the way you want.
So, in case you want the featured image anywhere in your post with the circle effect on mouse over, replace the code i posted above, in functions.php of your child theme with:
add_shortcode('tc-my-thumb', 'tc_my_post_thumbnail'); function tc_my_post_thumbnail($atts) { extract( shortcode_atts( array( 'size' => 'medium', 'class' => 'my-thumb-class' ), $atts ) ); ob_start(); echo '<div class="'.$class.'">'; if (is_page()) { do_action( '__post_thumbnail' , $size ); } else { echo ' <div class="tc-thumbnail"> <div class="thumb-wrapper"> <a class="round-div" href="#" onclick="return false;" title="'.get_the_title( get_the_ID()).'"></a>'; the_post_thumbnail($size); echo ' </div> </div> '; } echo '</div>'; $output = ob_get_contents(); ob_end_clean(); return $output; }and use [tc-my-thumb] with the class and size attributes, as above.
Forum: Themes and Templates
In reply to: [Customizr] Show featured images in blog posts?Yes, it is.
Assuming you know how to create a child theme (there’s a short tut on Customizr’s FAQ list on their website), add this code in your child theme’s functions.php:
add_shortcode('tc-my-thumb', 'tc_my_post_thumbnail'); function tc_my_post_thumbnail($atts) { extract( shortcode_atts( array( 'size' => 'medium', 'class' => 'my-thumb-class' ), $atts ) ); ob_start(); echo '<div class="'.$class.'">'; if ( has_post_thumbnail() ) { the_post_thumbnail($size); } echo '</div>'; $output = ob_get_contents(); ob_end_clean(); echo $output; }Now, all you have to do is add [tc-my-thumb] in your posts, where you want the thumbnail. You can choose one of the default sizes (thumbnail, small, medium, full or x,y (in pixels); more on this here) and you can also wrap the thumb in your class of choice, using the following syntax:
[tc-my-thumb size=”medium” class=”my-thumb-class”]
The thumb is wrapped in a div.my-thumb-class by default but you should replace that generic name with class names of your own, depending on how many sizes of thumbs you want to display site-wide, and style them to your liking.If you want the bubble effect on the thumb you’ll want to change the lines:
if ( has_post_thumbnail() ) { the_post_thumbnail($size); }with:
do_action( '__post_thumbnail' , $size );in the function above, but in this case you’ll have to define your own .my-thumb-class .round-div classes in CSS or you might see some corners (get inspired from first page or the posts lists).
Forum: Themes and Templates
In reply to: [Customizr] Menu text shadow.navbar .nav > li > a { text-shadow: none; color: white; } .navbar .nav > li > a:hover { color: #777; }You put it in your child theme’s style.css. NOT in the Custom CSS panel! It won’t work from there. Just edit style.css and it will work.
_________________@nikeo: I understand the reasoning behind stripping html from custom CSS in principle, but in this case (the custom CSS panel) maybe there should be a custom function only stripping the <‘s, not the >’s. It causes way too many problems with Customizr’s menu, that relies on those >’s.
Besides, whoever has access to the Custom CSS Panel can already damage the website anyway they see fit. Why strip their presumably malicious html from their input anyway?Forum: Themes and Templates
In reply to: [Customizr] Make tranisition in images fade instead of slide?@killasonna: sorry for the late reply, i was in a small vacation.
Debugging your issue should be done like this:
Create a test sub-domain. Clean install WP and Customizr and input content just enough for the slider to work. Test the code and see if it fades nicely. If it works, start adding the mods/scripts/plugins you have on your live website. After each one check the slider until you find the culprit.If it’s the last one you add, it’s all Murphy’s mother fault.
Forum: Themes and Templates
In reply to: [Customizr] Menu dropdown on hover and all parents link@bnock: do not replace data-toggle=”dropdown” with data-target=”#”.
data-toggle=”dropdown” – tells the browser to open the submenu on click (we don’t need that, since it’s opening on mouse-over)
data-target=”#” – replaces the link on the parent element with # (dead link, just scrolls the page to top) (we don’t want that, we want to keep the original link of the parent).
Now, the best way to make sure you are replacing both of the above with nothing (” ” = one single space character) is to:
a) disable/delete any replace you might have right now regarding this issue,
b) go in your page source and find the declarations above. They should be one after the other.
c) Copy the declarations as they are in the source,
d) paste it in the left window and
e) input a space in the right window.Right now the links on your parent elements are dead, if you replaced what you said above.
Forum: Themes and Templates
In reply to: [Customizr] Menu dropdown on hover and all parents link@bnock:
You actually want to strip the data-toggle=”dropdown” and data-target=”#” declarations from the page. So you need to find and replace them with a space. Those declarations are making the parent anchors not go where they’re supposed to, but instead to “#” (dead links). By removing them you keep the elements in the menu with their original links.You could replace them one by one, with two sepparate replaces, but I noticed they’re always together, in that order, so you may strip them in only one replace.
@anyone who is thinking about implementing all the above, please wait for a bit, I have just sent Nikeo a package that includes all the mods. Their chance of implementation in a future release of Customizr is quite high, so all of the above will become useless.
Forum: Themes and Templates
In reply to: [Customizr] Menu dropdown on hover and all parents linkI thought I took care of that with the
top: 96%;declaration. I’m not losing the .dropdown-menu on my website, in any browser, and I don’t use margin:0 on .dropdown-menu, no matter how slowly I move on those pixels. Are you losing it?
But, imho, this is a minor issue, it’s just that I don’t like the dropdown to overlap .navbar-inner, which is visible on my site, unlike on yours.
You are right in principle.
Forum: Themes and Templates
In reply to: [Customizr] Make tranisition in images fade instead of slide?I have no idea, Killasonna. There’s a code snippet that works in all installations except yours. There’s clearly a conflict somewhere, but I have no idea where. From all info, I can only guess it has either a CSS or js nature. I wish I could help more, but I’m out of ideas.
Good luck debugging it.
Forum: Themes and Templates
In reply to: [Customizr] Make tranisition in images fade instead of slide?@electricfeet: your slider works fine. 2 seconds transition. Very stylish. 🙂