[Support request] Content below Posts on category page

Home Forums Support [Support request] Content below Posts on category page

Home Forums Support Content below Posts on category page

Viewing 15 posts - 16 through 30 (of 45 total)
  • Author
    Posts
  • #1007565
    David
    Staff
    Customer Support

    Can you try this filter code:

    add_filter( 'generate_hook_element_display', function( $display, $element_id ) {
        if ( 10 === $element_id && is_paged() ) {
            $display = false;
        }
    
        return $display;
    }, 10, 2 );

    Again you need to change the ID #

    #1007571
    Sonja

    Okay, now it seems to be working. I only see it on page 1. What was the problem?

    And can you also tell me how to solve the other problems with the design?

    #1007574
    David
    Staff
    Customer Support

    The filter was missing a couple of arguments in the last line of the code.

    So add your markup within a DIV container like so:

    <div class="inside-article after-archive-container">
        <!-- add your content here -->
    </div>

    Then add this CSS:

    .after-archive-container {
        margin-top: 20px
    }
    #1007580
    Sonja

    Thanks, that looks good now.

    Still two questions:

    1. Is it possible to put the pagination box below the content?

    2. What is the meaning of the numbers 10, 2 in the filter?

    #1007681
    Sonja

    Now, since I insert content, there is nother problem. In this hook Section no line breaks are displayes an also the titles looks strange.

    The content there should be look like on a normal page. What to do?

    #1007836
    David
    Staff
    Customer Support

    Did you copy and paste the content?
    Can you make sure that all of the normal text is inside <p></p> tags.

    #1007839
    Sonja

    Yes I have copy and paste.

    I have put the contetn in <p></p> but nothing changes. Yes ihave delete the cache.

    #1007841
    David
    Staff
    Customer Support

    I am still not seeing any P tags around the text which is the reason the format is breaking.
    If you copied the content from another post, can you switch to the Text editor view ( not Visual ) and you should be able to see the P tags there, copy and paste that content.

    I would advise flushing the cache and disabling when making these changes and then re-enable it once you are done. Caches can cause a lot of pain otherwise.

    #1007886
    Sonja

    I have clear and disable the cahce again.
    I only use the text editor, never the visual one. So i copied from text editor. And i can assure, that i have put the contetn in those <p></p> tags.

    The problem persists.

    #1007906
    Leo
    Staff
    Customer Support

    I’m not seeing <p> tag either.

    Perhaps there are some HTML errors? Like an open tag without closing?

    I see an empty paragraph at the very top:
    https://www.screencast.com/t/Xaxaqja3fM

    You’d need to go through the entire thing carefully to make sure there aren’t any errors there.

    #1007921
    Sonja

    In a incognito browser without cache an login I can see clearly a <p> tag before the first h2 and a </p> after the last sentence in the sourcecode.

    #1007929
    Leo
    Staff
    Customer Support

    Each paragraph needs an opening <p> and a closing </p> (similar to what you have for <h2>)

    So your structure would be something like this:

    <h2>Allzeit bereit mit EDC</h2>
    <p>Description paragraph</p>
    <h2>Was sind typische EDC Tools?</h2>
    <p>Description paragraph</p>

    Might be beneficial to go through a tutorial like this?
    https://www.w3schools.com/html/html_paragraphs.asp

    #1007937
    Sonja

    grmpfff .. Each sentence in these tags? Or only each paragraph? And what about line breaks?

    Why it is not possible, to write normal like in text editor?

    #1007945
    Leo
    Staff
    Customer Support

    You can actually see how this works here:
    https://www.w3schools.com/html/tryit.asp?filename=tryhtml_paragraphs2

    That’s just how the text editor works – GP actually doesn’t have its own editor.

    #1007955
    Sonja

    Okay, but I use wordpress for about 10 years and i have always worked in the text editor. I have never used p tags in there.

    If i press return, then i automatically get a line break. Why this is not possible in the hook?

    Cause i wanted to put a lot of text in many category sites like this. But it is simply not doeble, if i have to put a p tag around each sentence. I want to focus on my text and not on the code.

Viewing 15 posts - 16 through 30 (of 45 total)
  • You must be logged in to reply to this topic.