We're merging with GenerateBlocks! Learn more here.

[Resolved] Title length

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Title length

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8647
    Bernhard
    Participant

    Hi Tom,
    I’ve actually the beta installed and try to understand how it works.
    My goal is actually to substitute Adsense content suggestions with WPSP. The content suggestions I have active on this page, six field within the table.
    I made some tests on my test page but I have some problems with the layout of the result.
    The settings of the first list is random pages, masonry, no border color
    The second list is random posts category, masonry, border color, background color on hover
    In both cases I don’t see masonry.
    So my questions:
    1. How can I show masonry
    2. In the first list are pages without image. Is there a simple way to exclude pages without image?
    3. In the second list the title goes out of the box. I would like to show only three lines of title and what exceeds shall not be shown.
    4. Is there a way to show random pages and posts together
    Actually I use the following code on all pages:
    `<style>
    .wp-show-posts-entry-title {
    line-height: 1.1em;
    min-height: 3.3em;
    max-height: 3.3em;
    }
    </style>
    By the way, the test page is in English and German and the list switches automatically to the correct language in Polylang.
    Best
    Bernhard

    #8651
    Tom
    Keymaster

    Hi there,

    1. It looks like your page has a javascript error (right click + Inspect and check the Console tab). You can deactivate your other plugins to see which plugin is causing the issue.

    2. Not by default. I suppose you could add a class to the post if it doesn’t have an image:

    add_filter( 'post_class', function( $classes ) {
        if ( ! has_post_thumbnail() ) {
            $classes[] = 'no-featured-image';
        }
    
        return $classes;
    } );

    Then you could do this:

    .no-featured-image {
        display: none;
    }

    3. Try adding this CSS:

    .wp-show-posts-entry-title {
        overflow: hidden;
    }

    4. As of right now, you can only show one post type at a time.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.