Header and footer customization

I am using X theme and Cornerstone. I wish to add additional images in the header. I want one of the images to be placed exactly beside the logo text without covering the menu items. Also I want to place both logo text and image in the header. Not only that I want the menu items to have sub menu items comprising a drop down list. I want these sub menu items to be product categories in WooCommerce. I do not want to manually enter these sub menu items every time a product category is added. I want every product category sub menu item to lead to a product category page which would display all the products in that sub category. I want to display additional images in the footer. Kindly suggest me how can I meet all of the above requirements?

Hello There,

Thanks for writing in!

Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

1.) To add an image and logo text in your header, assuming you have your child theme active and ready, please follow the following steps below:
i.) Please upload an image as your logo in X > Launch > Options > Header > Logo - Image

ii.) Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.

iii.) Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/GLOBAL/_BRAND.PHP
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================

$site_name        = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );
$logo             = x_make_protocol_relative( x_get_option( 'x_logo' ) );
$site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';

?>

<?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?>

<a href="<?php echo home_url( '/' ); ?>" class="x-brand text" title="<?php echo $site_description; ?>">
  <?php echo $site_name; ?>
</a>

<a href="<?php echo home_url( '/' ); ?>" class="x-brand img" title="<?php echo $site_description; ?>">
  <?php echo $site_logo; ?>
</a>

iv.) Save the file named as _brand.php
v.) Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/legacy/cranium/headers/views/global/

You will need to create the folders because this folder path does not exist in your child theme yet.

2.) Your sub menus can be manages in Appearance > Menus. For more details about the menus, please check out this codex: https://codex.wordpress.org/WordPress_Menu_User_Guide

Regretfully, there isn’t a feature in X or in WordPress that a submenu will be automatically generate items based on the product categories. It can only be done with custom development. Please be inform that custom development is way beyond the scope of our support.

Meanwhile, you may try to use a 3rd party plugin that would do the same. Please check out the WordPress repository:
https://wordpress.org/plugins/search/auto+submenus/

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.