Hi everyone,
Hope someone can help.
I want to insert a visitor/page view counter in the post page. The intent is to show how many people have seen that post.
It's possible to pull out that information from the analytics? Perhaps with code or there is any plugin that does that?
Anyone using Font Awesome wanting the search icon within the DIV Social Icon Wrapper of the header, here you go:
1. First enable your social links in your header.
2. Add a Link to the beginning of your Social Link List https://www.yourdomain.com/search
3. Add your Font Awesome Script to your Header Injection.
4. Include this Javascript within the Header to make the first link open in the same window:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.header-actions-action--social a:first-child[target="_blank"]').prop("target", "_self");
$('.header-menu-actions-action--social a:first-child[target="_blank"]').prop("target", "_self");
});
</script>
5. Add your css:
/*Custom Search Bar*/
.header-actions--right .header-actions-action--social .icon:first-child
{visibility:hidden}
.header-actions--right .header-actions-action--social .icon:first-child:after {
content: '\f002';
font-family: FontAwesome;
position: absolute;
margin-left:-1vw;
margin-top: 3px;
font-size: 15px;
color:lightgray;
visibility:visible}
.sqs-svg-icon--list a:first-child
{display:none}
/*Mobile*/
.header-menu-actions-action.header-menu-actions-action--social:first-child
{visibility:hidden}
.header-menu-actions-action.header-menu-actions-action--social:first-child:after {content: '\f002';
font-family: FontAwesome;
display: inline-block;
position: absolute;
margin-left:-15px;
margin-top: -25px;
font-size: 22px;
color:#0db14b;
visibility:visible}
/*END Custom Search Bar*/
If you're wanting to have it within the navigation instead of the social links, just write your CSS accordingly and leave out the nasty javascript.