Forum Replies Created
-
In reply to: Help with dynamic button positioning
Thanks. I gave that a shot but it just put it before the pagination elements, not inside.
In reply to: Help with dynamic button positioningWell I fixed the function so it works (displaying the button), but I still don’t know how to get the button into the position I want.
In reply to: Help with dynamic button positioningI fixed my function above so this works now:
function pmh_new_topic_button() { $forum_id=bbp_get_forum_id(); if ( is_user_logged_in() ) { echo '<a href="/forums/new-topic/?ForumId='. $forum_id .'"><div class="new-topic btn">New Topic</div></a>'; } } add_action('bbp_template_before_topics_loop','pmh_new_topic_button');
In reply to: Help with dynamic button positioningHrmm, I replied last night and it looks to be gone now. Not sure if I’ve gotten moderated but I’ll put my response here again.
Currently I’m just using this code in the content-single-topic.php template in my child theme.
<a href="/forums/new-topic/?ForumId=<?php echo bbp_get_forum_id()?>"><div class="new-topic btn">New Topic</div></a>
I have developed this for use in function.php to replace the above but I get a parsing error right now. It works ok if I don’t try to insert the ForumID so something is wrong with my syntax.
function pmh_new_topic_btn() { if ( is_user_logged_in() ) { echo '<a href="/forums/new-topic/?ForumId=".$_GET['ForumId'].""><div class="new-topic btn">New Topic</div></a>'; } } add_action('bbp_template_before_topics_loop','pmh_new_topic_btn');
Regardless of which method I use the resulting code is always placed after the bbp-pagination element and my CSS fu isn’t strong enough to have the button flow/move with the bbp-pagination-links contained within (is it even possible?).
<div class="bbp-pagination"> <div class="bbp-pagination-count"> Viewing 3 topics - 1 through 3 (of 3 total) </div> <div class="bbp-pagination-links"> </div> </div> <a href="/forums/new-topic/?ForumId=1486"> <div class="new-topic btn">New Topic</div> </a>
In reply to: Help with dynamic button positioningJust following up, I have a function I can use to put the button on the page instead of changing the content-single-forum.php page in my child theme, but it still puts it outside the bbp-pagination div so I run in to the same styling issues. I’m not sure what function to use if I want to insert something into that area.
In reply to: Help with dynamic button positioningYes. I have a full child theme set up with a functions.php and modified bbpress templates as well.
In reply to: Inserting text in forum “header”Update: I was able to figure out how to achieve my desired result via CSS by using this code:
.bbppu-mark-as-read:after { content: '|'; padding-left: 10px; padding-right: 10px; }
The result:
In reply to: Create New TopicThanks @robin-w! Unfortunately I couldn’t get that link to work. Oh well.
In reply to: Create New TopicI’m trying to find where the button gets created so I can edit the link then follow the rest of this post: https://bbpress.org/forums/topic/how-to-add-new-topic-button/
In reply to: Create New TopicI have bbp-style-pack installed and am using the button, but I don’t see any other options other than that? I’d like to also hide the form below the topics and have it on it’s separate page.
J