• Resolved Chigolo

    (@fitnsexy)


    Hello,

    I use the free version of the theme and would still want to make some minor changes.

    – How can I get pictures that are integrated in the post also displayed in the preview (overview of the posts in the category view)? I don’t want to see the entire content but only a text excerpt including my picture (which I would then arrange on the left or right). And where can I adjust the length of the preview?

    – Then I would like to show the categories in which the respective post is located. These should be displayed under the heading of the post (both in the post itself and in the preview ?.

    It would be nice if I could get information about this.

    Thanks in advance. I would love to leave a rating for your theme!

Viewing 15 replies - 1 through 15 (of 28 total)
  • Leo

    (@leohsiang)

    Hi there,

    – Are you referring to the featured image here or the actual pictures in the content?
    https://docs.generatepress.com/article/adding-featured-images/

    The featured images should show in the blog and archive pages by default.

    WordPress strips all HTML in excerpt by default so the only way to show the content pictures and keep the HTML is to use the more tag feature. That way you can also control the excerpt length:
    https://docs.generatepress.com/article/using-the-more-tag/

    – You can use these two filters to re-position the entry meta:
    https://docs.generatepress.com/article/generate_header_entry_meta_items/
    https://docs.generatepress.com/article/generate_footer_entry_meta_items/

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Thread Starter Chigolo

    (@fitnsexy)

    Hi Leo,

    I’m referring to the actual pictures in tne content

    The “more-tag-feature” is the easiest and best solution for me, so thx! I didn’t expect it’s that easy πŸ˜‰ It’s working great for my page.

    I’ve tried to emberd the following code:

    add_filter( 'generate_header_entry_meta_items', function() {
        return array(
            'categories',
            'date',
            'author',
        );
    } );

    It doesn’t work (using the “Code Snippet” plugin). Nothing has changed. But I even didn’t see the categories in the catory overvies or the articles itself? Do I have to activate them?

    Leo

    (@leohsiang)

    The entry meta should be activated by default in the free theme.

    The options to turn them on/off is only available in the premium plugin.

    Can you link me to the page in question?

    Thread Starter Chigolo

    (@fitnsexy)

    Hi Leo,

    I can send you the login data by email if you want. I would like the assignment of the categories to be displayed here (both in the post itself and in the overview): https://gyazo.com/245bf7800ee34d7025599c4de16cb49d

    I also have a question about the “more tag feature”. On mobile devices, the picture is displayed above the text. Is there a way to display the images correctly on cell phones and tablets (on the left (right)?

    Thank you for the support so far, really great!

    Leo

    (@leohsiang)

    I don’t need the login yet.

    Can you provide the site URL in question here first?

    Thread Starter Chigolo

    (@fitnsexy)

    Sorry if I did not express myself correctly. The site is in maintenance mode. But I will be happy to send you the access data for it.

    Leo

    (@leohsiang)

    You can send it in using the pre-sale form here:
    https://generatepress.com/contact/

    Please make sure to reference the topic URL.

    Thread Starter Chigolo

    (@fitnsexy)

    OK, I’ve just sent an email with the topic URL included.
    Thx in advance.

    Leo

    (@leohsiang)

    You have this CSS (twice) added that’s hiding the entry meta:
    https://www.screencast.com/t/CtPF3HAyj

    Thread Starter Chigolo

    (@fitnsexy)

    Allright, thx. How can I change this? Sorry but I’m a newbie …

    And you you have a tip for me about the pic?
    “I also have a question about the β€œmore tag feature”. On mobile devices, the picture is displayed above the text. Is there a way to display the images correctly on cell phones and tablets (on the left (right)?”

    Leo

    (@leohsiang)

    Tough to tell but I believe it’s added in Simple CSS plugin.

    As for the image alignment on mobile, try this:

    @media (max-width: 768px) {
        .entry-content .alignright {
            float: right;
        }
        .entry-content .alignleft {
            float: left;
        }
    }
    Thread Starter Chigolo

    (@fitnsexy)

    Hi Leo,

    I#ve checked the Simple CSS plugin. I didn’t find something about it … Theres nothing with “entry-meta”.

    This is the code in the Simple CSS plugin. I haven’t made any other manual settings that might have deactivated this. Could it be due to a plugin?

    /*HEADER BACKGROUND COLOUR*/
    .site-header {
    	background-color: #f7f8f9;
    }
    
    /*HEADER TITLE COLOUR*/
    .main-title a, .main-title a:hover, .main-title a:visited {
    	color: #a0027b;
    }
    
    /*HEADER TITLE MOBILE SITE*/
    @media screen and (max-width: 768px) {
          .main-title {
                font-size: 28px;
          }
    }
    
    /* MENU ITEMS */
    .main-navigation {
    	background-color: #a0027b;
    }
    
    .main-navigation .navigation-search input[type="search"], 
    .main-navigation .navigation-search input[type="search"]:active {
    	color: #FFFFFF;
    	background-color: #910271;
    }
    
    .main-navigation .navigation-search input[type="search"]:focus {
    	color: #FFFFFF;
    	background-color: #910271;
    }
    
    .main-navigation .main-nav ul li a, 
    .main-navigation .menu-toggle {
    	color: #FFFFFF;
    }
    
    /* MENU SEARCH */
    
    .main-navigation .menu-bar-items .search-item.active > a {
        color: #ffffff;
        background-color: #910271;
    }
    
    .main-navigation .menu-bar-items .search-item a:hover {
        background-color: #910271;
        color: #ffffff;
    }
    
    /* SUB-NAVIGATION */
    
    .main-navigation .main-nav ul ul li a {
    	background: #910271;
    	color: #FFFFFF;
    }
    
    /* MENU ITEM HOVER */
    
    .main-navigation .main-nav ul li:hover > a, 
    .main-navigation .main-nav ul li:focus > a,
    .main-navigation .main-nav ul li.sfHover > a {
    	color: #FFFFFF;
    	background-color: #910271;
    }
    
    /* SUB-NAVIGATION HOVER */
    
    .main-navigation .main-nav ul ul li:hover > a, 
    .main-navigation .main-nav ul ul li:focus > a,
    .main-navigation .main-nav ul ul li.sfHover > a {
    	color: ##bbd2e8;
    	background-color: #910271;
    }
    
    /* CURRENT ITEMS */
    
    .main-navigation .main-nav ul li[class*="current-menu-"] > a {
    	color: #FFFFFF;
    	background-color: #910271;
    }
    
    .main-navigation .main-nav ul li[class*="current-menu-"]:hover > a, 
    .main-navigation .main-nav ul li[class*="current-menu-"]:focus > a, 
    .main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a {
    	color: #FFFFFF;
    	background-color: #910271;
    }
    
    /* SUB-NAVIGATION CURRENT ITEMS */
    
    .main-navigation .main-nav ul ul li[class*="current-menu-"] > a {
    	color: #FFFFFF;
    	background-color: #910271;
    }
    
    .main-navigation .main-nav ul ul li[class*="current-menu-"]:hover > a, 
    .main-navigation .main-nav ul ul li[class*="current-menu-"]:focus > a, 
    .main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a {
    	color: #FFFFFF;
    	background-color: #910271;
    }
    
    /* HEADER PADDING */
    .inside-header {
          padding:20px;
    }
    
    /* SITE-INFO COLOUR */
    .site-info {
        color: #ffffff;
        background-color: #910271;
    }

    Codeo for image is working! Great, thx a lot!

    Leo

    (@leohsiang)

    That case I’m not too sure unfortunately – just seeing it in the source code.

    Try disabling all plugins first to test and activate the parent theme if you are using a child theme.

    Thread Starter Chigolo

    (@fitnsexy)

    I found the problem. It was due to the WP Meta and Date Remover plugin. That removed all of the metas. When I disable it, it works. Which classes do I have to exclude so that I have neither the author nor the date in my contributions, but still want to have the categories?

    The standard code in the plugin looks like this:

    .entry-meta {display:none !important;}
    	.home .entry-meta { display: none; }
    	.entry-footer {display:none !important;}
    	.home .entry-footer { display: none; }

    I only want to remove this: https://gyazo.com/795085880a03a9b2c62f1aa66820664b. And the categories should be only in the top (not in footer) and also with the icon on the left like https://gyazo.com/fc695645c10776d082fabaa7808e80a5.

    I’ve deactivated the plugin for you to check it in the frontend.

    Leo

    (@leohsiang)

    Try this:

    .entry-header .entry-meta {
        display: none;
    }
Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Pictures in post in preview and categories under title’ is closed to new replies.