Search Results for 'code'
-
Search Results
-
I created a page on our site and I’m using code from the “Newest Topics” template to make this page generate the most recent topics.
But this shows me the most recent activity, not the most recent topics. So, any topic that gets a new response then becomes the most recent topic, even if it was started a long time ago.
What I WANT to show are the most recently started topics, like the Newest Topics widget shows. Is there an adjustment I can make?
Can I include a new query in my page template that will order them differently?
Is there a different template for this altogether?
I am using the latest install of wordpress, buddypress and bbpress as well as gravity forms. I am needing to place a Gravity From inside a private bbpress forum topic as this form is meant to be seen only by members of this private buddypress group. When using the typical “add form” button at the top of the edit topic page which adds the shortcode to embed the form it places the shortcode there but then the shortcode is the only thing that appears when viewing the topic, not the intended form. Is shortcode not the way to do this and if not what is the best way to proceed to allow only members of this private group access to this form?
Wordpress 3.6.1, bbPress 2.4, Buddypress1.8.1 Site is http://www.thedoctorwhoforum.com
I’m using the visual TinyMCE editor on my bbPress Forum pages and also on my normal WordPress blog pages.
Some users have issues with spans and other code being copied in when they paste. I have been able to stop the pasting issue on the blog comments with the following code which added the paste plugin to TinyMCE:
function myformatTinyMCE($in) { $in['plugins'] = 'inlinepopups, paste, wordpress, wplink, wpdialogs'; $in['paste_text_sticky'] = true; $in['paste_text_sticky_default'] = true; return $in; } add_filter('tiny_mce_before_init', 'myformatTinyMCE' );However, it doesn’t affect TinyMCE on the Forums. They seem to be separate. I instigated the visual editor on the bbPress topics with the following code:
function bbp_enable_visual_editor($in) { $in['tinymce'] = true; return $in; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor');I’ve tried lots of different things, but I can’t seem to affect the bbPress TinyMCE the same way I can the blog TinyMCE.
For example, this didn’t work:
function bbp_enable_visual_editor($in) { $in['tinymce'] = true; $in['plugins'] = 'inlinepopups, paste, wordpress, wplink, wpdialogs, tabfocus'; $in['paste_text_sticky'] = true; $in['paste_text_sticky_default'] = true; return $in; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor');Anybody any ideas how to add paste to the plugins and possibly add paste_text_sticky etc as well? I’m a bit new at this.
Thanks.
Topic: Landing page issues
I want to create a custom landing page which displays my forums.
I have created a page with the bbPress shorcode [bbp-forum-index] which works fine.
However, the breadcrumb “forums” link goes to a different page which contains a load of text jibberish!
I changed the forums slug in the settings to my page (and updated the permalinks) but instead of the breadcrumb link going to the page with the shortcode, the page itself gets over-written by the text jibberish.
It actually looks like the bbPress sidebar is loading into the main content field, though i don’t know why or how to fix.
Page with shortcode > activenaturalist.org.uk/anforum/
Forums breadcrumb text jibberish > activenaturalist.org.uk/fmsforum/If anyone thinks this post looks familiar it is because i posted about something similar in the past then went under siege from a Chinese bot, the website has only recently been allowed back up by my host.
WP 3.6.1
bbPress 2.4I am using WordPress 3.6.1 with plugins Buddypress 1.8.1 and bbpress 2.3. I am trying to import the latest topics and replies from specific bbpress forums into specific wordpress pages.
I started with a Mysql query:
$query=”SELECT * FROM
wp_postsWHERE post_type = ‘topic’ OR post_type = ‘reply’ ORDER BY post_date DESC”;Then (in pseudo code) I planned to do the following:
// since forum is a parent of topic which is a parent of reply
// if post is topic get forum id
// if post is reply get forum id from the parent of the topic
//create an array of latest topics and replies associated with their forums
//print latest topics and replies for each forum to different wordpress pages.The problem I cannot seem to solve is – where to get the name of the forum from? Without getting the name of the forum from somewhere in the database, my only option would seem to be to hardcode the forum id’s of each forum with their respective names. Which means every time a new forum is created this needs to be added in manually in the code. None of the tables I see in the wp database seems to contain the names of the different forums. Even if one of the other tables did contain it I am still not sure how I would then associate the forum id’s from the wp_posts table with the forum names from another table – presumably I would have to do some kind of join? Or maybe I am going about it completely the wrong way – is anyone able to help an inexperienced developer out of his depth navigate his way through this problem?