acub
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] Topnav links not workingNo, we’re not allowed to make private contact. WP only hosts themes with free support, hence forbids any private means of contact.
There was a time when they allowed it and theme owners abused it in order to request payment for support, so even if it seems a bit harsh, their position is understandable.The irony is that it’s a severe limitation for people like me, who do it without ever asking anything in return. I sometimes lose a lot more time trying to explain some simple steps to someone who doesn’t know their way around WP than I would if I had access to their installation.
Forum: Themes and Templates
In reply to: [Customizr] Blog like feature on all three pages?The meta box is called “Page attributes” and is displayed under the one called “Publish” (which has the Status, Move to Trash, publish date, etc), in the right side.
The Page attributes meta box also has the “parent” select box. If you don’t see it there, click on Screen Options (top-right) and check “Page Attributes” check-box and it will show up. Hopefully :). If you still don’t see it, there are 2 cases:
1. Your WP installation is corrupted and you should try a re-install from the updates in dashboard.
2. You’re using a plugin that hides parts of the WP dashboard and you have accidentally and/or mistakenly hidden Page Attributes (in which case solution number 1 won’t work, you need to unhide Page Attributes from your plugin).Another possible cause you’re not seeing the template is if you have altered the header (the commented) part from it’s beginning. WP uses that comment to classify it as a template. I’m talking about:
<?php /* * Template Name: Blog Posts * @package Customizr * @since Customizr 3.0.12 */ ?>This should start from first line of the file and remain untouched.
That’s about it.
Forum: Themes and Templates
In reply to: [Customizr] Nothing is working on my siteNot really. The concept of backing up implies not starting from scratch.
If you backed up your database before upgrading WP, here’s what you need to do:
1. Download the WP version you had before upgrading from here.
2. Install it clean.
3. Import the database backup into the clean install either using WP importer or by using phpMyAdmin (if you backed up using WP exporter, you need to import the database with WP import). If you backed up using phpMyAdmin, Adminer or similar products, you need to use the same tool to import.At this point your site should be restored. Installing clean and importing database is the only way to downgrade WP, because sometimes WP changes the database structure and you can’t run lower version on a database updated for higher versions. This is why your restore doesn’t work, because your database has been upgraded for 3.7. You need to reinstall 3.5 clean (or what you had before) and than import the backup data.
And by the way, this has nothing to do with Customizr, you would have had the same problem no matter what theme you were using. If there was such an issue with Customizr, you wouldn’t have been the only one experiencing it.
Forum: Themes and Templates
In reply to: [Customizr] Adding a horizontal submenu/secondary menu?bagedi, I don’t understand the nature of your problem. A link would be helpful.
Forum: Themes and Templates
In reply to: [Customizr] Call to Action link – tel?This can be easily achieved with RTFR plugin.
Of course, you do need to add some posts in a hidden category or some pages that you’re never going to use, select them in the picture slider options and replace each of their links with the tel:+ link. However, keep in mind that links to those posts/pages will get replaced with the tell links throughout the website, unless you build a fancy regex to make sure only the ones in the slider match your replacement rules.
If you don’t feel comfortable using a replacement plugin, (though I recommend RTFR, it’s quite light and clean), you could run a preg_replace on tc_slider_display output. As in add this to your functions.php (child theme):
add_filter('tc_slider_display', 'replace_links_with_tels'); function replace_links_with_tels($output) { return preg_replace(array( '|href="link-to-post-1"|', '|href="link-to-post-2"|', '|href="link-to-post-3"|' ), array( 'href="tel:+#########1"', 'href="tel:+#########2"', 'href="tel:+#########3"' ), $output, -1); }Using this solution you don’t have to worry about links being replaced all over the website, hence you could use existing posts/pages as targets, since the preg_replace is only run on the slider.
Forum: Themes and Templates
In reply to: [Customizr] Padding textAre you sure you want the content narrowed on mobiles too? If not, set min-width using a media query (see above).
Forum: Themes and Templates
In reply to: [Customizr] Adding a horizontal submenu/secondary menu?I believe the hook is “__before_header”, if you want it above header.
Forum: Themes and Templates
In reply to: [Customizr] Topnav links not workingFunkan, can you please provide a link to your website?
Forum: Themes and Templates
In reply to: [Customizr] Nothing is working on my siteBefore upgrading your WordPress to 3.7 you have been warned and advised to backup the database and your files at least twice. Have you done it? If yes, restore your database and files from the backup. Also, I can assure your Customizr. 3.0.13 works very well with 3.7.
My advice is to setup a test domain or subdomain and try this: install a WP 3.7 clean. Install Customizr 3.0.13 clean. Export your posts from you current website and import them into the new one. Install and activate your plugins. If all is well on the test site, I’ll teach you how to swap it on the website. If it’s not ok, my solution is not good.
Forum: Themes and Templates
In reply to: [Customizr] Adding a horizontal submenu/secondary menu?You put it in your child theme’s functions.php. If this is the first customization done using a custom function, your child theme’s functions.php should be empty, having only one line:
<?phpwhich opens up php mode, but no actual php code. So basically this is how your child theme functions.php should look like after you add the code above:
<?php add_action( 'init', 'register_secondary_menu' ); function register_secondary_menu() { if ( function_exists( 'register_nav_menu' ) ) { register_nav_menu( 'secondary-menu', 'Secondary Menu' ); } } add_action('__header', 'display_secondary_menu', 1000, 0); function display_secondary_menu() { echo ( has_nav_menu( 'secondary-menu' ) ? wp_nav_menu ( array ( 'theme_location' => 'secondary-menu', 'container_id' => 'secondary-menu', 'container_class' => 'secondary-menu' ) ).'<div class="clearall"></div>' : '' ); }The css should be added in style.css of the child theme or in the custom CSS panel in theme customizations page. If you don’t already have a child theme, you should make one (read about how to make one on theme’s webpage, in tutorials).
Please note that in the initial code I added the display menu function as a filter on “__header”. I realized when looking over the code again that it should be done as an action in this case, not as a filter. It works both ways, but since I’m not filtering anything, just adding code to the header, it should be done through action. I also believe it’s a bit faster. Anyway, the code from this post has been updated.
Forum: Themes and Templates
In reply to: [Customizr] menu hover snippet broken in mobile screensIt looks like I was testing with the initial function and had a broken preg_replace in the snippet. Thanks for searching, finding and pointing that out.
Snippet updated.
Forum: Themes and Templates
In reply to: [Customizr] Adding a horizontal submenu/secondary menu?add_action( 'init', 'register_secondary_menu' ); function register_secondary_menu() { if ( function_exists( 'register_nav_menu' ) ) { register_nav_menu( 'secondary-menu', 'Secondary Menu' ); } } add_filter('__header', 'display_secondary_menu', 1000, 0); function display_secondary_menu() { echo ( has_nav_menu( 'secondary-menu' ) ? wp_nav_menu ( array ( 'theme_location' => 'secondary-menu', 'container_id' => 'secondary-menu', 'container_class' => 'secondary-menu' ) ).'<div class="clearall"></div>' : '' ); }Of course, you need to actually create a new menu and assign it in the new location and perhaps style it a bit. A basic styling would be:
#secondary-menu ul { text-align: center; list-style-type: none;} #secondary-menu ul li {display: inline-block; padding: 0 5px;}This removes the bullets from menu items and centers them with a bit of left-right padding. The sky is the limit here.
Forum: Themes and Templates
In reply to: [Customizr] menu hover snippet broken in mobile screensIt does a bit more than just add that.
It replaces this structure:<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="{some_link}"> {some_page_name} <b class="caret"></b> </a>with
<a class="a-stripped" href="{some_link}"> {some_page_name} </a> <a href="#" class="dropdown-toggle a-caret" data-toggle="dropdown" data-target="#"> <b class="caret"></b> </a>I basically move data-target and data-toggle from the existing link to a new one that I wrap around the caret. This way the initial anchor regains its link and no longer opens a submenu. The opening of the submenu is done now by the new link, the caret wrapper.
I’m using the same logic as tweeter Bootstrap 3. The guys at tB realized that disabling parent links in menus was a mistake, that was holding people off from using their menus and they have corrected this in Bootstrap 3, by dividing the parent buttons in two areas: link (the text) and caret (the arrow). It’s exactly what I do here. I create an extra link for the caret, so the initial one works as the WordPress menu intended it: a link to a parent page.
Forum: Themes and Templates
In reply to: [Customizr] menu not visibleFor best results use with bootstrap 3.0 responsive theme
Customizr uses bootstrap 2.3.2. It’s incompatible with 3.0.
Try changing the theme to another and than back to Customizr or the child-theme.Forum: Themes and Templates
In reply to: [Customizr] choose specific posts for front pageGo to posts list in backend. Quick edit the two posts you want on first page and make them sticky (it’s near status dropbox, in the right side).
Add this code in your child theme’s functions.php.
add_action( 'pre_get_posts', 'sticky_posts_on_frontpage' ); function sticky_posts_on_frontpage ( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'post__in', get_option( 'sticky_posts' )); } else { $query->set('post__not_in', get_option( 'sticky_posts')); } }The function will make your first page display only sticky posts and will hide them from the rest of the website. If you don’t want to hide them from the rest of the website, just delete the else part, including the accolade after it. However, being sticky posts they will always show up at the top of the list of your posts. You’re not limited to two posts.
This could be done by using a category instead of sticky posts, if you think you’ll actually use sticky posts option in the way it was meant (make some posts stick to the top of the list). Look over more examples for pre_get_posts here.