Na latin-extendend in custom theme for Wordpress - php

I have created custom theme for wordpress - nothing complicated, just starting page, no footer, sidebar, menu. But here I have problem which I can't solve. I want to use font "Lato" from google fonts with latin extendend fonts (polish signs). As I provided proper codes in header (I think), in css, but still the result is like that: http://artystycznaperspektywa.com/
Here is header.php
<!DOCTYPE HTML>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Lato&subset=latin-ext" rel="stylesheet">
</head>
Here is index.php:
<?php get_header(); ?>
<body>
<div class="container">
<div id='logo'><img src="<?php bloginfo( 'template_url' ); ?>/img/logo.png" ></div>
<div id="intro">Dziękujemy za odwiedzenie strony Artystycznej Perspektywy. Zapraszamy do zapoznania się z naszą ofertą:</div>
<div id="select">
<div id="malarstwo">
<div class="sign1">
<div class="name1">
<img src="<?php bloginfo( 'template_url' ); ?>/img/malarstwo.jpg" >
<a class="link" href="http://artystycznaperspektywa.com/malarstwo/">Malarstwo ścienne</a>
</div>
</div>
</div>
<div id="fotografia">
<div class="sign2">
<div class="name2">
<img src="<?php bloginfo( 'template_url' ); ?>/img/fotografia.jpg" >
<a class="link" href="http://artystycznaperspektywa.com/fotografia/">Fotografia</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
And of course in css font is put in html, body.
Does someone see what can couse problems with fonts? This problem does not appear in other sites (which are made on ready theme), only on this custom theme.

Please check if selected encoding of the file index.php in your code editor is UTF-8, probably it's not, and because the charset of the page is set to UTF-8 <meta charset="UTF-8" /> this causes the problems to appear.

Related

Rogue &nbsp in Wordpress blog

I have a weird problem with my Wordpress blog.
&nbsp is inserted right after the <body> tag. There's no &nbsp in the header.php file, though. It's just the <body> tag and then a <div>.
Is there any way to stop this?
Thanks in advance!
EDIT |
This is the header.php:
<!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="<?php echo esc_url( 'gmpg.org/xfn/11' ); ?>">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper">
<?php do_action('__before_header') ; ?>
<?php hu_get_template_part('parts/header-main'); ?>
<?php do_action('__after_header') ; ?>
<div class="container" id="page">
<div class="container-inner">
<?php do_action('__before_main') ; ?>
<div class="main">
<div class="main-inner group">
<?php do_action('__before_content') ; ?>
What is ?
It's good explained here
How to remove from html?
You should find beetwen which html tags it's occured and delete all spaces which are between that tags.
Considering discussion on your question: after body tag you got . So, just removing spaces after <body> from header.php of your wordpress child and parent themes stops rendering .

CodeIgniter Head Empty and content in body

Hey i don't understand my website doesn't work i have don't do anything so i will explain
I got a 0 in top on my page now!
Google Chrome Explorator:Screenshot
https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.wisementrade.com%2F
View/header.php: https://pastebin.com/7GqFYR75
View/homepage.php: https://pastebin.com/3htmFSmw
View/footer.php: https://pastebin.com/b3X9KScg
Controller/View.php: https://pastebin.com/cxCdcdEQ
Chrome viewer code: https://pastebin.com/Q8VYja5u
I have check the encode UTF-8 and i have re encode UTF-8 with my sublime text but nothing change ... please need help
EDIT: FIXED
I guess unclosed HTML tag cause this problerm. I found a few unclosed HTML tag in your View/header.php. Close it. try this.
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--o-->
<?php
//Session
$customer_id = $this->session->userdata('customer_id');
$user_type = $this->session->userdata('user_type');
$statement = $this->session->userdata('timezone');
?>
<!--o-->
<link rel="icon" type="image/png" href="<?php echo base_url('images/favicon.png'); ?>" />
<meta name="author" content="Wise Men Trade" />
<meta name="copyright" content="Copyright Notice ©2015 WisemenTrade Limited and licensors. All rights reserved." />
<meta name="robots" content="all" />
<!--o-->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script language="JavaScript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Bootstrap CSS -->
<link href="<?php echo base_url("css/bootstrap.min.css"); ?>" rel="stylesheet"/>
<!-- Basic CSS -->
<link href="<?php echo base_url("css/style.css"); ?>" rel="stylesheet"/>
<!-- Responsive CSS -->
<link href="<?php echo base_url("css/responsive.css"); ?>" rel="stylesheet"/>
<!-- Important Owl stylesheet -->
<link rel="stylesheet" href="<?php echo base_url("css/owl-carousel/owl.carousel.css"); ?>"/>
<!-- Default Theme -->
<link rel="stylesheet" href="<?php echo base_url("css/owl-carousel/owl.theme.css"); ?>"/>
<!-- MS DROP DOWN -->
<link rel="stylesheet" href="<?php echo base_url('css/msdropdown/flags.css'); ?>"/>
<link rel="stylesheet" href="<?php echo base_url('css/msdropdown/dd.css'); ?>"/>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-62333409-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
</head>
<body>
<!--top-header-->
<header>
<div class="header_block">
<!-- left -->
<div class="block_left">
<a href="<?php echo base_url(); ?>">
<img src="<?php echo base_url("images/log_wmt.png"); ?>" class="logo" width="130" height="130" alt="Logo Wise Men Trade" />
</a>
</div>
</div>
</header>
also in your Controller/View.php have a few unclosed div (<div id="container"> and <div class="block_content">). check it and close it.
the last, make sure at the end of your Controller/View.php have a :
</body> <!-- end of body -->
</html> <!-- end of html -->
According to the documentation (https://www.codeigniter.com/user_guide/general/views.html), you could load multiple views in your controller, I think it doesn't work if you load it in the view, so you should have something like this:
<?php
class Page extends CI_Controller {
public function index()
{
$data['page_title'] = 'Your title';
$this->load->view('header');
$this->load->view('menu');
$this->load->view('content', $data);
$this->load->view('footer');
}
}

Wordpress Header Background Image Issue

After hours of trying different things and codes, I came here to seek some help (I'm beginner in coding).
I'd like to put a full width and full height background image only in the header. The site is here: http://www.coveragenewstv.com/
Here is header.php :
<head>
<title><?php wp_title('|', true, 'right'); ?></title>
<meta charset="<?php bloginfo( 'charset' );?>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
wp_head(); /** we hook up in wp_booster #see td_wp_booster_functions::hook_wp_head */
?>
</head>
<body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">
<?php //this is closing in the footer.php file ?>
<?php /* scroll to top */?>
<div class="td-scroll-up"><i class="td-icon-menu-up"></i></div>
<div id="td-outer-wrap">
<div class="td-transition-content-and-menu td-mobile-nav-wrap">
<?php locate_template('parts/menu-mobile.php', true);?>
</div>
<?php //this is closing in the footer.php file ?>
<div class="td-transition-content-and-menu td-content-wrap">
<?php
td_api_header_style::_helper_show_header();
do_action('td_wp_booster_after_header'); //used by unique articles
Add two code-blocks to the bottom of your css file:
.td-banner-wrap-full, .td-header-menu-wrap-full {
background-color: transparent;
}
and
.td-header-wrap.td-header-style-1 {
background-image: url(http://www.joomlaworks.net/images/demos/galleries/abstract/7.jpg);
background-size: cover;
}
Replace the url to your background image url.
See: Works fine

Wordpress:Display A specific Header for a Page

I have been trying To have No header for My Landing Page,but a sticky nav Bar On the header for the rest of my pages.
I edited the header(header.php),but it gets applied to all the pages.I would like The header To not show on the landing page.
Here is my code.
<?php
/*
* Header Section of Iconic One
*
* Displays all of the <head> section and everything up till <div id="main">
*
* #package WordPress - Themonic Framework
* #subpackage Iconic_One
* #since Iconic One 1.0
* /
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<?php if ( get_theme_mod( 'themonic_logo' ) ) : ?>
<div class="themonic-logo">
<img src="<?php echo get_theme_mod( 'themonic_logo' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</div>
<?php if( get_theme_mod( 'iconic_one_social_activate' ) == '1') { ?>
<div class="socialmedia">
<img src="<?php echo get_template_directory_uri(); ?>/img/twitter.png" alt="Follow us on Twitter"/> <img src="<?php echo get_template_directory_uri(); ?>/img/facebook.png" alt="Follow us on Facebook"/> <img src="<?php echo get_template_directory_uri(); ?>/img/gplus.png" alt="Follow us on Google Plus"/><img src="<?php echo get_template_directory_uri(); ?>/img/rss.png" alt="Subscribe RSS"/>
</div>
<?php } ?>
<?php else : ?>
<hgroup>
<?php bloginfo( 'name' ); ?>
<br .../> <a class="site-description"><?php bloginfo( 'description' ); ?></a>
</hgroup>
<?php if( get_theme_mod( 'iconic_one_social_activate' ) == '1') { ?>
<div class="socialmedia">
<img src="<?php echo get_template_directory_uri(); ?>/img/twitter.png" alt="Follow us on Twitter"/> <img src="<?php echo get_template_directory_uri(); ?>/img/facebook.png" alt="Follow us on Facebook"/> <img src="<?php echo get_template_directory_uri(); ?>/img/gplus.png" alt="Follow us on Google Plus"/><img src="<?php echo get_template_directory_uri(); ?>/img/rss.png" alt="Follow us on rss"/>
</div>
<?php } ?>
<?php endif; ?>
<div class="clear"></div>
</header><!-- #masthead -->
<div id="main" class="wrapper">
I have removed The nav bar on this File,But i wish to use the nav bar on all my other pages.
I tried the IS page() function,but it Does not work,for me at least.Could someone provide an example on how this should be done
You need to create static "template page",
your first one would be your home page.
<?php /* Template Name: Homepage */?>
<?php get_header();?>
-- BODY HERE --
<?php get_footer();?>
Now you create how many pages you got like this, Home, About, Service, Profile, Contact.
Now you don't need a template for every single page but it wouldn't hurt I would recommend doing that.
Finally to get the different header for other page you just create a different header-other.php and use it instead of the header.php....
Make sure you use -name.php because you will call it like this on the page you want.
<?php get_header('name');?>
so anything past the - you put in here and WordPress will know that you are trying to use that HEADER.
I hope this helps and solves all your issues, best of luck with your project.

Realy need some help with social sharing button

I bump into this problem:
When you go to my website: http://www.appartementtekooputrecht.nl and click on the twitter share button, it directs twitter to http://www.appartementtekooputrecht.nl/samenvatting (last page) in stead of to the homepage.
I have placed the share plugin share code in more parts of the theme, but with no good result.
Fyi in this theme all pages are displayed on the homepage.
Any help would be realy appreciated!
here is my header.php (share is at the end)
<?php global $shortname; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php elegant_titles(); ?></title>
<?php elegant_description(); ?>
<?php elegant_keywords(); ?>
<?php elegant_canonical(); ?>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/ie6style.css" />
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">DD_belatedPNG.fix('img.overlay, div#content-bg-bottom');</script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body>
<div id="wrapper">
<div id="content">
<div id="content-bg-bottom">
<div id="header">
<ul>
<li class="active">Home</li>
<?php query_posts(array
('post_type' => 'page',
'orderby' => get_option('myresume_nav_sort_pages'),
'order' => get_option('myresume_nav_order_page'),
'post__not_in' => get_option('myresume_nav_exclude_pages')
)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post()?>
<li><?php the_title() ?></li>
<?php endwhile; endif; wp_reset_query(); ?>
</ul>
<br class="clear" />
<div id="logo">
<img class="avatar" alt="Appartement te koop Utrecht Utrecht" src="http://www.tim-productions.tv/appartementtekooputrecht.nl/wp-content/themes/MyResume/images/appartement-te-koop-utrecht-logo.jpg" />
<img class="overlay" src="<?php bloginfo('template_directory'); ?>/images/photo-overlay.png" alt="" />
<span>
<br />
<?php echo(get_option('myresume_email')) ?>
<br />
<?php echo(get_option('myresume_phone')) ?>
</span>
</div>
</div>
<div id="inside">
<div id="inside-bg-top">
<div id="inside-bg-bottom">
<div class="resume slide">
<div class="social"><?php lacands_wp_filter_content_widget(); ?></div>
And here the theme index.php
<?php get_header(); ?>
<?php query_posts(array
('post_type' => 'page',
'orderby' => get_option('myresume_sort_pages'),
'order' => get_option('myresume_order_page'),
'post__in' => get_option('myresume_exclude_pages')
)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post()?>
<div class="page-content">
<div class="entry">
<?php the_content('') ?>
</div>
<h2><?php the_title() ?></h2>
</div>
<?php endwhile; endif; wp_reset_query(); ?>
<?php get_footer(); ?>
I downloaded that plugin and I can see in the code of the file "la-click-and-shared.php", around line 560, that the widget gets the links that passes to the social buttons from the permalink of the current post/page. What I can't know is why you have that permalink.
I would guess it must be a problem either with the permalink/name of the post, with the permalinks setting in general or with the AJAX functionality, but it is difficult to help you further without further details.
You could try these:
Check the permalink of that page or post you are showing as home.
Disable custom permalinks temporarily and see if it works then.
Is the Settings > Reading > Front page displays option set correctly?
Disable other plugins temporarily
Edit:
You could also edit la-click-and-shared.php. In the latest version that I just have downloaded, this is line 556:
$args['link'] = htmlentities($link1);
If you can't fix it any other way and/or you are in a hurry, you could just do:
$args['link'] = 'http://www.appartementtekooputrecht.nl';
Since your site only exposes that URL anyway it is not a big deal. But, of course, you are 'breaking' the plugin if you change your site in the future so it doesn't use AJAX (inappropriately in my opinion) to load all the pages with the same URL (no browsing history either).

Categories