- This topic has 44 replies, 3 voices, and was last updated 3 years, 8 months ago by Tom.
-
AuthorPosts
-
September 12, 2019 at 5:34 am #1007565DavidStaffCustomer 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 #
September 12, 2019 at 5:39 am #1007571SonjaOkay, 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?
September 12, 2019 at 5:44 am #1007574DavidStaffCustomer SupportThe 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 }
September 12, 2019 at 5:51 am #1007580SonjaThanks, 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?
September 12, 2019 at 7:02 am #1007681SonjaNow, 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?
September 12, 2019 at 7:52 am #1007836DavidStaffCustomer SupportDid you copy and paste the content?
Can you make sure that all of the normal text is inside<p></p>
tags.September 12, 2019 at 7:58 am #1007839SonjaYes I have copy and paste.
I have put the contetn in <p></p> but nothing changes. Yes ihave delete the cache.
September 12, 2019 at 8:04 am #1007841DavidStaffCustomer SupportI 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.
September 12, 2019 at 9:10 am #1007886SonjaI 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.
September 12, 2019 at 9:30 am #1007906LeoStaffCustomer SupportI’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/Xaxaqja3fMYou’d need to go through the entire thing carefully to make sure there aren’t any errors there.
September 12, 2019 at 9:44 am #1007921SonjaIn 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.
September 12, 2019 at 9:50 am #1007929LeoStaffCustomer SupportEach 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.aspSeptember 12, 2019 at 9:56 am #1007937Sonjagrmpfff .. 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?
September 12, 2019 at 10:03 am #1007945LeoStaffCustomer SupportYou can actually see how this works here:
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_paragraphs2That’s just how the text editor works – GP actually doesn’t have its own editor.
September 12, 2019 at 10:17 am #1007955SonjaOkay, 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.
-
AuthorPosts
- You must be logged in to reply to this topic.