- This topic has 7 replies, 3 voices, and was last updated 3 years, 2 months ago by
David.
-
AuthorPosts
-
January 22, 2023 at 7:33 am #2504744
Rick
Hi there,
I’ve been using the Generateblocks to create some awesome things for my website. But struggling with two things:
I have created a custom title for my comments. I would like to include a button (arranged at the right) with a dynamic link to the Reply section of the comments. So that when there’s lots of comments, users can easily navigate there. The title and icon are in place (see https://gorilla.bi/power-query/list-functions/#comments ). However, the button do not show up.
My questions are:
1. Why does the button not show up, even though I’ve configured a hook for it? The setup in the element first has a Grid. Within that grid there are 2 containers. 1 container contains the Comments icon and title. The other container contains the ‘Leave a reply’ button, aligned at the right. I’ll paste the code html code for the element below:
2. How can I configure the button to include a dynamic link to the relevant html-anchor for the reply? I’m using the buttons generateblock. I know the link for this ends with: #reply-title.
For example, have a look at https://gorilla.bi/power-query/list-functions/#reply-titleThanks in advance 🙂
Rick
Here is the code for step 1. Paste this into the code editor of a block element:
<!– wp:spacer {“height”:”25px”} –>
<!– /wp:spacer –>
<!– wp:generateblocks/grid {“uniqueId”:”36b36d89″,”columns”:2,”isDynamic”:true,”blockVersion”:2} –>
<!– wp:generateblocks/container {“uniqueId”:”ffb94bb3″,”isGrid”:true,”gridId”:”36b36d89″,”width”:50,”widthMobile”:100,”isDynamic”:true,”blockVersion”:2} –>
<!– wp:generateblocks/container {“uniqueId”:”0b5192c2″,”isDynamic”:true,”blockVersion”:2} –>
<!– wp:generateblocks/container {“uniqueId”:”6c252a87″,”width”:1,”widthMobile”:100,”flexGrow”:1,”flexShrink”:1,”outerContainer”:”contained”,”marginBottom”:”30″,”isDynamic”:true,”blockVersion”:2,”gpInlinePostMeta”:true} –>
<!– wp:generateblocks/headline {“uniqueId”:”799b665f”,”backgroundColor”:””,”textColor”:””,”linkColor”:””,”linkColorHover”:””,”borderColor”:””,”highlightTextColor”:””,”marginBottom”:”0″,”paddingRight”:”5″,”hasIcon”:true,”iconColor”:””,”iconSize”:1.4,”inlineWidth”:true,”removeText”:true} –>
<h2 class=”gb-headline gb-headline-799b665f”><span class=”gb-icon”><svg class=”” xml:space=”preserve” style=”enable-background:new 0 0 512 512″ viewBox=”0 0 612 612″ y=”0″ x=”0″ height=”512″ width=”512″ xmlns:xlink=”http://www.w3.org/1999/xlink” version=”1.1″ xmlns=”http://www.w3.org/2000/svg”><g transform=”matrix(-1,0,0,1,612,0)”> <g> <g id=”_x32__26_”> <g> <path class=”” data-original=”#000000″ fill=”#000000″ d=”M401.625,325.125h-191.25c-10.557,0-19.125,8.568-19.125,19.125s8.568,19.125,19.125,19.125h191.25 c10.557,0,19.125-8.568,19.125-19.125S412.182,325.125,401.625,325.125z M439.875,210.375h-267.75 c-10.557,0-19.125,8.568-19.125,19.125s8.568,19.125,19.125,19.125h267.75c10.557,0,19.125-8.568,19.125-19.125 S450.432,210.375,439.875,210.375z M306,0C137.012,0,0,119.875,0,267.75c0,84.514,44.848,159.751,114.75,208.826V612 l134.047-81.339c18.552,3.061,37.638,4.839,57.203,4.839c169.008,0,306-119.875,306-267.75C612,119.875,475.008,0,306,0z M306,497.25c-22.338,0-43.911-2.601-64.643-7.019l-90.041,54.123l1.205-88.701C83.5,414.133,38.25,345.513,38.25,267.75 c0-126.741,119.875-229.5,267.75-229.5c147.875,0,267.75,102.759,267.75,229.5S453.875,497.25,306,497.25z”></path> </g> </g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> </g></svg></span></h2>
<!– /wp:generateblocks/headline –><!– wp:generateblocks/headline {“uniqueId”:”09e0ffdd”,”backgroundColor”:””,”textColor”:””,”linkColor”:””,”linkColorHover”:””,”borderColor”:””,”highlightTextColor”:””,”fontSize”:30,”marginRight”:”5″,”marginBottom”:”0″,”paddingLeft”:”7″,”borderSizeTop”:”0″,”borderSizeRight”:”0″,”borderSizeBottom”:”0″,”borderSizeLeft”:”0″,”iconColor”:””,”inlineWidth”:true,”className”:””,”gpDynamicTextType”:”comments-number”,”gpDynamicTextReplace”:”#”,”gpDynamicNoCommentsText”:”0″,”gpDynamicSingleCommentText”:”1″,”gpDynamicMultipleCommentsText”:”%”} –>
<h2 class=”gb-headline gb-headline-09e0ffdd gb-headline-text”>#</h2>
<!– /wp:generateblocks/headline –><!– wp:generateblocks/headline {“uniqueId”:”e003660c”,”backgroundColor”:””,”textColor”:””,”linkColor”:””,”linkColorHover”:””,”borderColor”:””,”highlightTextColor”:””,”marginBottom”:”0″,”paddingLeft”:”5″,”iconColor”:””} –>
<h2 class=”gb-headline gb-headline-e003660c gb-headline-text”>Comments</h2>
<!– /wp:generateblocks/headline –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/container –><!– wp:generateblocks/container {“uniqueId”:”4fee48eb”,”isGrid”:true,”gridId”:”36b36d89″,”width”:50,”widthMobile”:100,”isDynamic”:true,”blockVersion”:2} –>
<!– wp:generateblocks/container {“uniqueId”:”6664328f”,”isDynamic”:true,”blockVersion”:2} –>
<!– wp:generateblocks/container {“uniqueId”:”0c78fabc”,”width”:1,”widthMobile”:100,”flexGrow”:1,”flexShrink”:1,”outerContainer”:”contained”,”marginBottom”:”30″,”alignment”:”right”,”isDynamic”:true,”blockVersion”:2,”gpInlinePostMeta”:true,”gpInlinePostMetaJustify”:”flex-end”} –>
<!– wp:generateblocks/button-container {“uniqueId”:”3515d692″,”isDynamic”:true,”blockVersion”:2} –>
<!– wp:generateblocks/button {“uniqueId”:”84c3a982″,”hasUrl”:false,”backgroundColor”:”#f4f4f4″,”backgroundColorHover”:”#F4F4F4″,”textColor”:”#333333″,”textColorHover”:”var(\u002d\u002daccent)”,”borderColor”:””,”borderColorHover”:””,”paddingTop”:”15″,”paddingRight”:”20″,”paddingBottom”:”15″,”paddingLeft”:”20″,”borderRadiusTopRight”:”5″,”borderRadiusBottomRight”:”5″,”borderRadiusBottomLeft”:”5″,”borderRadiusTopLeft”:”5″,”blockVersion”:2,”className”:””,”gpDynamicTextType”:”user-meta”,”gpDynamicTextReplace”:”Leave a Reply”} –>
<span class=”gb-button gb-button-84c3a982 gb-button-text”>Leave a Reply</span>
<!– /wp:generateblocks/button –>
<!– /wp:generateblocks/button-container –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/container –>
<!– /wp:generateblocks/grid –>January 22, 2023 at 5:56 pm #2505254Fernando Customer Support
Hi Rick,
Let’s tackle the missing button issue first.
Can you provide admin login credentials so we can take a closer look at the issue? Point us to where we can see this specific button as well.
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
January 23, 2023 at 1:42 am #2505498Rick
Hi fernando,
Thanks so much for your help. Login provided in the private section. There is an element called Comment Title, I believe its:
https://gorilla.bi/wp-admin/post.php?post=7591&action=edit
You can find it by going to Appearance -> Elements -> Comments Title
You’ll also find the button I mean there. Can you see why it doesn’t show up?
Thanks RickJanuary 23, 2023 at 1:52 am #2505503Fernando Customer Support
Hi Rick,
Remove the setting you set here: https://share.getcloudapp.com/2Nu692LR
Set it to
Choose...You can set a static link here: https://share.getcloudapp.com/xQuOQ91v
January 23, 2023 at 2:09 am #2505522Rick
Hey Fernando. This worked great. Also just figured out I can simply enter: #reply-title, and it takes the current page and navigates it to the relevant anchor.
Also the button now shows. What settings did you change so the button appeared? It wasn’t visible before and now it is 🙂
Thanks,
RickJanuary 23, 2023 at 5:15 am #2505723David
StaffCustomer SupportHi there,
the Changes Fernando prescribed here:
https://generatepress.com/forums/topic/button-for-comments-leave-a-reply/#post-2505503
is why the button now shows.
if you set the Dynamic Text Type to something that does not exist then it won’t display the block.So the end solution was to disable the dynamic data.
And just use a normal button with static label text and a URL of#reply-titleJanuary 23, 2023 at 6:26 am #2505794Rick
It’s so simple once you know. Thank you very much team, much appreciated 🙂
Rick
January 23, 2023 at 6:58 am #2505842David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.