the Loop

Sorry, but where is the Loop in travelify theme?
I need to exclude some categories from my home page and I need modify the Loop.
Thanks.
Bye!

Sorry for late response, I was off during weekend.

Loop can be found on content-extensions.php which is located in theme folder - library - structure. However, there is an options for this theme that you can access via Theme Options to specify what categories are displayed on front page. See “Homepage Post Options” section on Theme Options

thank you very much. I’ll try and I’ll say about it.
A question: is this forum powered by bbpress or another plugin?
Thanks.
Bye!

Yes, this forum is powered by bbPress.

Thank you, I read that travelifytheme has been integrated witf bbpress in its last release.

Another question: is it possibile to insert a “shopping cart logo” at the right bottom of the home page?
Thak you very much!
Bye

  1. Unfortunately I didn’t include bbPress support in the latest version because code provided on WordPress.org forum was far from ideal solution for this theme. Will have to look for better solution.

  2. It really depends on your setup and where and how you want it to appear. The simplest method would be to use footer widgets for that but it really depends on how you want it to appear and function.

Sorry, I’ld say at the right top. I need the shopping cart logo in tge header or, better, in the main menu at the right.
How can I do it on Travelify theme?
Thank you!

To add shopping cart icon to menu you can add this code to header-extensions.php inside line 245., right before closing menu div.

<div class="card-icon">Your icon code</div>

Then add proper floats and styling for this newly created div. This depends on what kind of icon you will use and how you want to it to be styled.

The main thing is to add float to push it to the right side. The rest is up to you

.card-icon {
    float: right;
}

Sorry, but the “your icon code” is the url of the cart image? Or the code to connect it to the cart?

And where have I to insert

.card-icon {
    float: right;
}

?

Thank you very much!
Bye

It can be either WooCommerce code (look for documentation what code snippet you should use for that) or just an image link with URL to shopping cart or any other page. Both options are fine.

Code you mentioned should be added to Theme Options - Other - Custom CSS

Hi, I put the cart logo in the navigation bar, but this code works only on pc version. In the mobile version the cart logo goes under the correct navigation menu in an uncorrect place. How can I do?
Thanks!
Bye!

Yes, because regular menu is replaced with drop down menu which is more useful for small screens. To get your icon working on mobile you need to resize drop down menu like this

#main-nav select {
    width: 80%;
}

Afterwards you will have to display menu again but this depends on many different aspects. You can use Chrome or Firefox Developer Tools to inspect what element you need to display. The basic idea would be

.your-awesome-element {
display: block !important:
}

I don’t understand your last words.
Is it only if the menu isn’t all visible in the desktop version, right? If it is visible I haven’t to do anything, right?
Thanks!
Bye!

Unfortunately it doen’t work with 70% too. The cart is in the rightpart of the main menu bar. but it appears under her. How is it possible?

Any idea? Have a good Easter! :slight_smile:

Just play around @media queries in CSS to make sure what is displayed in mobile devices and what isn’t. Here is a simple guide about media queries to understand how it works. http://css-tricks.com/css-media-queries/

This is not part of theme setup and configuration, therefore it is out of scope of free support.

Happy easter! :slight_smile:

Idea!
I’m not able to make it by css, then I say: if I create a cart logo as a new social icon and I put it in the social icons list? Is it a good idea? Or not?
Bye!

I see that you are not going to give up with this one.

Add this code to functions.php file (in best case scenario Child Theme functions.php file) or inside second theme function file which is located in theme folder - library - functions.

/**
 * Place a cart icon with number of items and total cost in the menu bar.
 */
function travelify_woomenucart($menu, $args) {

	// Check if WooCommerce is active and add a new item to a menu assigned to Primary Navigation Menu location
	if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || 'primary' !== $args->theme_location )
		return $menu;

	ob_start();
		global $woocommerce;
		$viewing_cart = __('View your shopping cart', 'travelify');
		$start_shopping = __('Start shopping', 'travelify');
		$cart_url = $woocommerce->cart->get_cart_url();
		$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );
		$cart_contents_count = $woocommerce->cart->cart_contents_count;
		$cart_contents = sprintf(_n('%d item', '%d items', $cart_contents_count, 'travelify'), $cart_contents_count);
		$cart_total = $woocommerce->cart->get_cart_total();
		// Uncomment the line below to hide nav menu cart item when there are no items in the cart
		// if ( $cart_contents_count > 0 ) {
			if ($cart_contents_count == 0) {
				$menu_item = '<li class="pull-right"><a class="woo-menu-cart" href="'. $shop_page_url .'" title="'. $start_shopping .'">';
			} else {
				$menu_item = '<li class="pull-right"><a class="woo-menu-cart" href="'. $cart_url .'" title="'. $viewing_cart .'">';
			}

			$menu_item .= '<span class="genericon genericon-cart"></span> ';

			$menu_item .= $cart_contents.' - '. $cart_total;
			$menu_item .= '</a></li>';
		// Uncomment the line below to hide nav menu cart item when there are no items in the cart
		// }
		echo $menu_item;
	$social = ob_get_clean();
	return $menu . $social;

}
add_filter('wp_nav_menu_items','travelify_woomenucart', 10, 2);

And add this code to Theme Options - Other - Custom CSS.

.genericon.genericon-cart:before {
    font-family: 'Genericons';
    content: '\f447';
    vertical-align: bottom;
    font-size: 20px;
}

Above give code is much more advanced that just cart icon and it will also display what is in the basket and how much it will cost etc.

Other stylings might be required but it is completely up to you. No further modification will be provided from my side regarding this code snippet.

I tried and… it works very well!
Thank you very much!
Bye.