Info
- 4 posts
- 2 voices
- Started 3 months ago by Ph0eniX2018
- Latest reply from Ph0eniX2018
- This topic is not resolved
Inject a shortcode or JS into each post topic automatically.
-
- Posted 3 months ago #
I am trying to get a twitter button to display inside each post at the bottom.
I am using the 2.0 plugin with WP 3x. I have been through both the template and plugin. I am using the Elbee Elgee 1.3.5 BBPress ready theme.
The Twitter plugin I am using has both a shortcode and a JS I can reference to display the "Tweet Me" button. I can get it to display anywhere I want, but I am unable to find where to place the code so it shows up within the actual topic posts.
Day 3 of trying to figure this out, so thought I would lick my wounds and ask for help.
WP 3.3.1
BBPress: 2.0.2 Plugin
Theme: Elbee Elgee 1.3.5
PHP: 5 -
- Posted 3 months ago #
You'll probably need to hook a custom function ithat you create nto one of the actions in the template files, depending on where you want the code to appear.
-
- Posted 3 months ago #
I would like the Tweet button to display on the bottom of submitted topics. I've tried several methods, but I can't seem to place any code inside of topic content.
How do I expand on the topic hook to automatically place code into any submitted topic?
I would even be ok with placing the button outside of the topic, like the container, but I have been unable to do this. I am using the plugin, as well as a BBPress ready theme, so I have been hacking both trying to figure out how to get the desired code into topics.
-
- Posted 3 months ago #
I found a workaround for displaying a Twitter Tweet Me button inside individual topics on bbPress 2.0 and using WP 3.x.
Open up: wp-content/plugins/bbpress/bbp-includes/bb_user_template.php
Under // Default arguments on line 451 after: 'after' => ')<include tweet me js script here>
The above will display your twitter button directly under the topic posters name/ip address (if enabled). Use line breaks as needed.
This is likely not the best solution, but given the utter arse-circus of using bbpress plugin, and a bbpress template, and since support is very limited for bbpress, this might work for you as well.
See it in action here: http://alienlikeproductions.com/forums/topic/welcome-to-the-end-of-our-age/
-
You must log in to post.