Sidebar widget & menue

Hi,

  1. I’m displaying my blog posts in my sidebar widget. How can I only show the featured images and not the text title?
  2. How can I display my social media symbols in the sidebar?

Menue
3. In my blog’s the menue is expaned, but reduces itself when I’m scrolling. How can I make it the same (smaller) size?

Thank you!
Nimue

Hi Nimue,

Please add this code in X > Theme Options > CSS:

.x-sidebar .x-recent-posts .x-recent-posts-content {
    display: none;
}

You may add a text widget or custom html widget to the sidebar and make use of the icons shortcode:

http://demo.theme.co/integrity-1/shortcodes/icons/

Then wrap it in an <a> tag to link it. For example:

<a href="https://www.facebook.com/" target="_blank">[x_icon type="facebook"]</a>

My apologies but I did not quite get what you are trying to do. Would you mind elaborating so that we can provide some more suggestions?

Thank you.

Hi Jade,

you like always amazing! Thank you!!!

  1. I just see at the sidebar is also the date shown… - how can I turn it off?

  2. Sorry for my unclear last question…

This is the height of the menue when first opened:

This is the hight of the menue I want to have:

And I don’t know why it expands, as it didn’t do it originally.
Thank you!
Nimue

Hi Nimue,

Thanks for making it clear. I have checked and the issue only happens on single post. Did you customize the single post template through the child theme? It seems that there is something incorrect about the layout of the page:

The stray &nbsp; next to the body tag is causing the space above the navigation in the single posts. Also, there are a lot of html elements that could be loaded in the <head> tag but are in the body so kindly check your custom codes and make sure that they are correct.

Hope this helps.

Great thank you!!!

I checked the html on the page post (5053) itself, but I can’t find it.
Can you please tell me where exactly I have to look?
Thank you!

Nimue

Hi Nimue,

​To assist you better with this issue, please provide us the url of your site with login credentials so we can take a closer look and your site and investigate.

To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Thank you.

Thank you I added the credentials.

Hello Nimue,

Thanks for the details.

I have checked your site and found what was causing the issue. It is the single.php that has this file content:

&nbsp;
<!-- Damit werden die Bilder pinable fuer Pinterest -->
<script
    type="text/javascript"
    async defer
    src="//assets.pinterest.com/js/pinit.js"
	data-pin-hover="doit"
	data-pin-tall="true"
></script>



<?php

// =============================================================================
// SINGLE.PHP
// -----------------------------------------------------------------------------
// Handles output of individual posts.
//
// Content is output based on which Stack has been selected in the Customizer.
// To view and/or edit the markup of your Stack's posts, first go to "views"
// inside the "framework" subdirectory. Once inside, find your Stack's folder
// and look for a file called "wp-single.php," where you'll be able to find the
// appropriate output.
// =============================================================================


x_get_view( x_get_stack(), 'wp', 'single' );

From the looks of it, you are trying to load the JS code below for single posts:

<!-- Damit werden die Bilder pinable fuer Pinterest -->
<script
    type="text/javascript"
    async defer
    src="//assets.pinterest.com/js/pinit.js"
	data-pin-hover="doit"
	data-pin-tall="true"
></script>

A better and more efficient way to do it is to load the file in the functions.php through the wp_head hook.

As I have checked you already have this code :

add_action('wp_head', 'add_header_code');
function add_header_code(){
?>
	<meta name="p:domain_verify" content="837ef79328a6334fb1df86739ce5065e"/>
<?php }

So what you can do is load the pinterest JS in the same area and make use of the is_single() Wordpress conditional so that it will only be loaded in single posts like this:


add_action('wp_head', 'add_header_code');
function add_header_code(){

     if( is_single() ) { ?>
          <!-- Damit werden die Bilder pinable fuer Pinterest -->
          <script type="text/javascript" async defer src="//assets.pinterest.com/js/pinit.js" data-pin-hover="doit" data-pin-tall="true"></script>
<?php
     }
?>
	<meta name="p:domain_verify" content="837ef79328a6334fb1df86739ce5065e"/>
<?php }

Then you may delete the single.php file.

Hope this helps.

THANKS SOOO SOOO MUCH!!! for the clarifying and extensive answer! @Jade

I appreciate it so much! That’s extremely helpful!

Nimue

You are most welcome. :slight_smile:

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