acub
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] Navbar extend bar across page and behind logoBefore the actual header is requested and rendered, every page runs a function called
__before_header
. Provided that you know how to create your “seamless ribbon look” element, you can hook it before the header with this command, which you should add in your child theme’s functions.php:add_action ('__before_header', 'content_before_header');
The line above tells WordPress: every time you run
__before_header
I want you to run a function calledcontent_before_header
. Of course, we need to define that function, like this:function content_before_header() { $my_custom_content = ' <!-- put your HTML and/or php code here --> '; // next, I will wrap and echo to the page whatever you have put // in the variable above. Adding row-fluid class to the container // i'm making sure the theme will span the content across all // the width of the page echo('<div class="row-fluid">'.$my_custom_content.'</div>'); // if you want to further customize the look of this container // you might also consider adding an id to it, as in: // class="row-fluid" id="some-unique-id" }
Forum: Themes and Templates
In reply to: [Customizr] Adding raw htmljoisaac, you need to ask your question in a separate thread.
Forum: Themes and Templates
In reply to: [Customizr] Can not change header/login issueA possible quick-fix for this problem is to go in your child theme folder and, if you have an
/inc/
folder in it, move every file that matches the name of a file inside/customizr/inc/parts/
from your child theme’s/inc/
folder in child theme’s/inc/parts/
folder (create it if it doesn’t exist).Forum: Themes and Templates
In reply to: [Customizr] Can not change header/login issueYour link is wrong. However, I was able to deduct it and saw the printscreen.
Get in your website via ftp. Go to
wp-content/themes/
and prefix customizr folder with an underscore.Now you should be able to log in to your website via WP. I presume WP will tell you your current theme has been disabled as the parent theme is missing. Switch to some default WP theme (i.e.: 20-14). Now go back to the ftp and remove the underscore from customizr folder. Reload the WP themes page and switch to customizr. Attention: to customizr, not to the child theme (or you’ll get the same error again).
The source of the problem most probably is related to some call from your child theme to
class-header-nav_walker.php
, which was moved fromcustomizr/inc/
tocustomizr/inc/parts/
in last version of the theme.I need more info to get to the bottom of this but at least I hope I got you in, so you can look deeper into it.
Forum: Themes and Templates
In reply to: [Customizr] 200 pages from my Menu are goneYou should consider dropping the last level of your menu and displaying those pages as a submenu/list on their parent page only. 200 items in a menu is a bit much. What happens when someone opens that menu on a mobile device?
Forum: Themes and Templates
In reply to: [Customizr] 200 pages from my Menu are goneActually, all you need is WP MSP. I had a similar problem when sending more than 100 variations of a woocommerce product but it worked after I maxed the limit to 2000 variables.
The real nasty part about this error is that it’s completely silent. Just dies without a log, without a warning, like everything worked as expected.
Forum: Themes and Templates
In reply to: [Customizr] Own logo / favicon won't loadTo force a favicon refresh add this function to your child theme’s functions.php:
add_filter('tc_favicon_display', 'force_favicon_refresh'); function force_favicon_refresh($html) { return preg_replace( '%(favicon.(ico|jpg|gif|png))"%', '$1?v=2"', $html ); }
Note: the solution above assumes your favicon is named favicon and has a file type of ico, jpg, gif or png. If that is not the case, you should change the 3rd line of code to:
return preg_replace('%(XXX.YYY)"%', '$1?v=2"', $html );
where you need to replace
XXX.YYY
with the actual name of your favicon file.About your slider “problem”, you cannot change the contents of the main slider. It’s built-in and doesn’t rely on images that are stored on your website as media files. However, you can replace the demo slider with one of your own. Make sure you have all the images you will be using for your slider and upload them in Dashboard > Media > Add new.
You will be able to create new sliders and/or edit their slides from the file’s edit screens. You will than need to go to Dashboard > Appearance > Customize > Front Page and choose the slider you have created.add_action ('__after_content_title', 'display_custom_fields_block'); function display_custom_fields_block() { if ( ! is_singular()) return; $custom_fields_array = array( 'price' => 'Price', 'website' => 'Website', 'related_posts' => 'Related Posts' ); $output = custom_fields_iteration($custom_fields_array); if (strlen($output) > 0 ) echo ' <div class="cf-wrap">'. $output.' </div>'; } function custom_fields_iteration ($custom_fields_array) { $output = ''; foreach ($custom_fields_array as $custom_field => $label) : $custom_field_value = get_post_meta(get_the_ID(), $custom_field, true); $output .= (strlen($custom_field_value) > 0 ? ' <div class="'.$custom_field.'-wrap"> <span class="cf-label">'.$label.': </span>'. $custom_field_value.' </div>' : ''); endforeach; return $output; }
The code I wrote above is checking to see if there is anything to display and exits the function if the custom field value is empty. So you are basically asking for a solution that has already been delivered to you, but your current level of understanding code is not high enough to see and use it.
Also, not knowing how to display information on multiple lines indicates some serious gaps in your understanding of html and css. If you want to build this website alone, you really need to understand the basics of web development.
Start here.
First off, you don’t need a plugin to use custom fields. Go into any page/post edit screen (backend), click Screen Options (right upper corner) and check “Custom fields” if it’s not already checked.
Now look in the page for the box called “Custom Fields”. You will see the list of existing custom fields related to your current post/page and their values. You may add, update or delete custom fields for the current page/post.
In order to display the value of the field you need a custom php function. I’ll name it
custom_field_after_title()
. Also, I will add anadd_action
to the__after_content_title
hook that will tell the theme to run our custom function every time it prints a title. In this example I am assuming your custom field is calledyour_custom_field
, but you need to change that with the actual name of your custom field for it to work.function custom_field_after_title() { /* Get out if not on singular page: */ if (! is_singular()) return; /* Get value of the custom field: */ $custom_field_value = get_post_meta(get_the_ID(), 'your_custom_field', true); /* Checking if your_custom_field is empty. * If it's not, wrap it in a div with a custom class * of ycf-class so we can style it via css */ if (strlen($custom_field_value) > 0) $output = '<div class="ycf-class">' . $custom_field_value . '</div>'; else return; /* get out if field is empty */ echo $output; /* print the result */ } /* Now we closed the function but we need to hook it * to __after_content_title */ add_action ('__after_content_title', 'custom_field_after_title');
Everything enclosed in /* comment markup */ can be removed, I just put it there to explain the code. Just make sure you remove all the comment, not just part of it.
Forum: Themes and Templates
In reply to: [Customizr] Change settings in color.css file in child style.css1. Your code is valid.
2. You do not need to create a child version of black.css. You need to place your code inside style.css of your child theme.Here is how the your child theme’s style.css should look like:
/* Theme Name: Customizr Child Theme URI: https://example.com/ Description: Your description Author: You Author URI: https://example.com/ Template: customizr Version: 1.0.0 */ /* Add your custom CSS code below this line */ .carousel-caption h1 { font-family: Garamond; font-size: 2em; color: red; } .carousel-caption p { font-family: Garamond; font-size: 2em; color: blue; } .carousel-caption .btn { font-family: Garamond; font-size: 2em; color: yellow; }
Of course, you should add your own details (name, website, etc)… Do not touch the
Template: customizr
line.Your functions.php (if you have not added any php custom code to it) should look like this:
<?php // Add your custom php code below this line
This is all you need to get started. Just activate the child theme and you will see the css applies, if you haven’t damaged the parent theme and if your child theme does not contain any other files that interfere.
If it doesn’t, just delete any other files you might have added in child theme and/or reinstall the parent.
The two files I mentioned above should be placed in the root of the child theme.Rule of thumb: CSS always works as expected. If some rule does not apply in a browser but it applies in others, it is from one of these causes:
1. Your browser didn’t load the new (modified) stylesheet and uses a cached older copy of it. You need to force-refresh the page to fix this.
2. Your CSS has browser specific selectors (WP appends a browser-specific classes to the body element, allowing CSS fixes for specific browsers). Check your CSS for any of the following selectors (.ie, .gecko, .chrome, .safari, .opera).
3. Your CSS has browser specific CSS attributes (prefixed with -webkit, -moz, -o or -ie). If this is the case, you need to add the CSS that works in your browser.
4. You have errors in your CSS that prevent the browser to read your declaration properly (a common mistake is not closing curly brackets of a css rule, this making most browsers ignore the selector of the next CSS rule, since it thinks it is still inside the previous rule).
5. There is a stronger CSS selector that overrides your code but it only loads in your current browser (some themes load different stylesheets for different browsers – especially for IE).Having said that, I should add that CSS debugging can be tricky and sometimes misleading, so your best bet is to provide a link and let us know what you are trying to achieve.
Forum: Themes and Templates
In reply to: [Customizr] fixing navbar on one lineThe more you enlarge a font, the less words are going to fit on one row. That is a fact. You need to consider:
1. using a smaller font-size
2. using a different, narrower, font
3. Changing your page names to shorter ones.
4. Any combination of the above.Forum: Themes and Templates
In reply to: [Customizr] Add background color of level 1 menu itemsIf by “level 1 items” you are referring the first level of the menu items, the menu parents, the right CSS selector for them is
ul.tc-hover-menu > li { }
You need to put your CSS within the curly brackets.
Forum: Themes and Templates
In reply to: [Customizr] www not workingThis setting is usually controlled from the hosting account admin (cPanel, kloxo, whatever your host provider has). It has nothing to do with WordPress, nevermind the theme.
You can, however, use .httaccess to redirect
https://domain
towww.domain
and viceversa.When I try to see your www i get redirected to http. No error here.