schastnyy
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Emphasize] Yoast BreadcrumbsHi Andre.
No, I haven’t added a folder “page-templates” into my child theme yet. Instead of this fact, take a look at the following files:
single.php
<?php /** * The template for displaying all single posts. * * @package Emphasize */ get_header(); ?> <div id="primary" class="content-area"> <div class="container"> <?php if ( function_exists( 'yoast_breadcrumb' ) ) { yoast_breadcrumb(); } ?> </div> <main id="main" class="site-main" role="main"> <?php $singlestyle = get_theme_mod( 'single_layout', 'singleright' ); switch ($singlestyle) { // Single Right Sidebar case "singleright" : echo '<div class="container"><div class="row"><div class="col-md-8">'; get_template_part( 'loop' ); echo '</div><div class="col-md-4">'; get_sidebar( 'right' ); echo '</div></div></div>'; break; // Single Left Sidebar case "singleleft" : echo '<div class="container"><div class="row"><div class="col-md-8 col-md-push-4">'; get_template_part( 'loop' ); echo '</div><div class="col-md-4 col-md-pull-8">'; get_sidebar( 'left' ); echo '</div></div></div>'; break; // Single - no sidebars case "singlewide" : echo '<div class="container"><div class="row"><div class="col-md-12">'; get_template_part( 'loop' ); echo '</div></div></div>'; break; } ?> </main> </div> <?php get_footer(); ?>
page.php
<?php /** * The template for displaying all pages. * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages * and that other 'pages' on your WordPress site will use a * different template. * * @package Emphasize */ get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <div class="container"> <?php if ( function_exists( 'yoast_breadcrumb' ) ) { yoast_breadcrumb(); } ?> <div class="row"> <div class="col-md-8"> <?php get_template_part( 'loop' ); ?> </div> <div class="col-md-4"> <?php get_sidebar( 'right' ); ?> </div> </div> </div> </main> </div> <?php get_footer(); ?>
They are located in the child theme folder and seems to work fine on a test site, but not on the public one.
So, what other changes do I need to perform?
Forum: Themes and Templates
In reply to: [Emphasize] Add custom social iconsure
Forum: Themes and Templates
In reply to: [Emphasize] Add custom social iconHi Andre,
D.U.N [done])))
Thanks for your help.
I’ve tried some plugins, but they don’t work as they should. So, here is a decision:1. Create a child theme (was done earlier)
2. Create child functions.php file with the following code to add Font Awesome icons to WP. (credit – https://sridharkatakam.com/using-font-awesome-wordpress/):
<?php // Load Font Awesome add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); function enqueue_font_awesome() { wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' ); }
3. Add a few lines to child style.css file to detect the icon for vk.com using new font:
.social-navigation a[href*="vk.com"]:before { content: "\f189"; font-family: "FontAwesome"; }
As a result, I’ve left Genericons from the parent theme as it is and have added only one icon that I need. It seems to work – https://nimb.ws/RaLuPZ
Forum: Themes and Templates
In reply to: [Emphasize] Add custom social iconI’ve just noticed that Font Awesome has this icon included https://fortawesome.github.io/Font-Awesome/3.2.1/icon/vk/
Is there a simple way to add it to the theme?
Forum: Themes and Templates
In reply to: [Emphasize] Add custom social iconAs I see this font have no VK icon, so can you please explain how to add it for my site?
Forum: Themes and Templates
In reply to: [Emphasize] Add custom social iconHi Andre,
It depends. I really like the styles in your theme and I’m thinking about creating the similar icon for vk.com.
So, if there is an opportunity to insert a font icon, it will be perfect. If not, maybe I can add this icon manually by creating a custom detection for this social network using style.css or so.