Code Supply Co.

Customer Support Service

General

Facebook sharing not showing featured image

Facebook should be pulling the so called OpenGraph meta. This feature is a plugin’s territory.

Please install SEO by Yoast and enable OpenGraph meta:

https://wordpress.org/plugins/wordpress-seo/

https://kb.yoast.com/kb/getting-open-graph-for-your-articles/

Then check your page with the Facebook Linter Tool:

https://developers.facebook.com/tools/lint/

It should reset the OpenGraph cache your images should be pulled by Facebook.

 

How to Use a Custom Font

You need to follow these steps to add a custom font:

  1. Upload webfont files to your server to your wp-content/uploads/ folder.
  2. Navigate to Appearance > Customize > Custom CSS and add your new custom font-face (this is an example, mind the path to your font files, the font name, etc.). You may also use the child theme’s style.css to add these lines.
    @font-face {
        font-family: 'Your Custom Font Name';
        src:    url('path/to/fonts/custom-font.eot');
        src:    url('path/to/fonts/custom-font.eot') format('embedded-opentype'),
            url('path/to/fonts/custom-font.ttf') format('truetype'),
            url('path/to/fonts/custom-font.woff') format('woff'),
            url('path/to/fonts/custom-font.svg') format('svg');
        font-weight: normal;
        font-style: normal;
    }
  3. Add your custom font to the typography dropdowns in Appearance > Customize by adding these lines to your child theme’s functions.php:
    /**
     * Add Custom Fonts to Customizer.
     *
     * @param array $fonts array of fonts.
     */
    function csco_custom_fonts( $fonts ) {
    	$fonts[ 'custom-font' ] = array(
    		'label' => 'Your Custom Font Name',
    		'stack' => 'Your Custom Font Name',
    	);
    	return $fonts;
    }
    
    add_filter( 'kirki/fonts/standard_fonts', 'csco_custom_fonts' );
  4. Now you should be able to see your custom font in the list of fonts in Appearance > Customize.

How to Update Your Theme

Install it as a new theme

To download the latest version of the theme, go to your ThemeForest account → Downloads section, locate the theme, click on Download button and select the “Installable WordPress file only” option.

Now from your WordPress Dashboard, navigate to Themes and activate a default WordPress theme, like TwentySixteen or similar.

Delete the current version of the theme that you want to update.

Upload and Activate the newest version.

Note: It seems scary, but you really won’t lose any of your data. The only exception is if you have made edits to theme files like header.php, footer.php etc. These changes will need to be applied again to the new files. All of your content and theme settings are preserved.

Plugin: As an alternative, you may want to use a plugin to automate backing up your current theme and uploading the new version: Easy Theme and Plugin Upgrades.

Automatically via Envato Market Plugin

Install the Envato Market Plugin from Appearance → Install Plugins.

Navigate to the Envato Market menu, follow the instructions to generate a Global OAuth Personal Token, and enter the Token in your WordPress Dashboard. Your themes can now be updated automatically.

Using a FTP software

To download the latest version of the theme, go to your ThemeForest account → Downloads section, locate the theme, click on Download button and select the “Installable WordPress file only” option.

Login to your server through FTP and navigate to wp-content/themes/ folder of your WordPress installation.

Back up your existing theme by downloading its folder to a safe location on your local hard drive.

Then extract the contents of the archive, you downloaded from ThemeForest, and upload the theme folder to wp-content/themes/.

How to change the number of posts per page

In order to increase the number of posts per page, please navigate to Settings > Reading and change the number of “Blog pages show at most” setting.

 

How to exclude slider posts from the main archive on homepage

In order to exclude posts, featured in the slider, from the main archive please paste this code snippet to your child functions.php:

function exclude_featured_posts_from_main_query( $query ) {
  if ( $query->is_home() && $query->is_main_query() ) {
    $query->query_vars['meta_query'] = array(
      array(
        'key'     => 'csco_post_featured',
        'value'     => 'home',
        'compare'   => 'NOT LIKE',
      ),
    );
  }
}

add_action( 'pre_get_posts', 'exclude_featured_posts_from_main_query' );

How to set up Twitter Widget

In order to set up Twitter Widget please follow these easy steps:

  1. Create a new Twitter app here.
  2. Install and activate CSCO: Twitter API plugin. See screenshot.
  3. Go to AppearanceWidgets and add Twitter widget to your sidebar.
  4. Input your Twitter app credentials. See screenshot.

Please note, that Twitter API plugin works only with the latest version of PHP. Please make sure, your PHP version is at least 5.6.

If your website stops loading after activating the Twitter API plugin, it’s obvious, you’re running an old version of PHP on your server.

Please ask your hosting provider to upgrade your PHP to a newer version.

How to set up Facebook Widget

Please enable Facebook SDK and input your Facebook App ID in AppearanceCustomizeConnect.

To get Facebook App ID please see this guide.

How to translate your theme

In order to translate a theme into your language, please use either POEdit or Loco Translate.

After you’ve done the translation, place two files (MO and PO) into the /lang/ folder of the theme.

Please note, that files must be named correctly, i.e. fr_FR.mo, de_DE.mo, it_IT, etc.

For the full list of language codes please see WordPress section here.

In order to keep your translation after each theme update, please send us the two files (MO and PO) and we will bundle them with the theme.

Theme is missing the style.css stylesheet

It’s a common issue and there’s an easy fix for it.

Please read this guide.

Where to get MailChimp Embedded Form URL

In order to make subscribtion forms work, please make sure you’ve set up Embedded Form URL in AppearanceCustomizeConnect.

Embedded form url must look like this.

Go to MailchimpListsYour ListSignup FormsEmbedded Form and copy URL between quotes:

<form action="..."></form>

See example.

Select the URL and hit Ctrl-С (Cmd+C for Mac).

Paste the URL to the Embedded Form URL field in AppearanceCustomizeConnect.

The Affair

Mobile Menu

In order to have navigation in mobile view please navigate to AppearanceWidgets and drag and drop Custom Menu to Primary widget area, then select your menu from the dropdown.

See screenshot for details.

Authentic

How to create Video Backgrounds

Please select Post Format: Video and Featured Post Location: either Post Archives or Home Slider. Don’t forget to input video URL (either YouTube or Vimeo) in the Embed field below post title.

See screenshot for details.