Skip to:
Content
Pages
Categories
Search
Top
Bottom

Featured image on new forum topics – form-topic.php


  • Ron Gomez Hoff
    Participant

    @talkbaja

    Anybody ever edit the form-topic.php file to enable adding a featured image to the new topic post and willing to share how you did it?

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

  • Robin W
    Moderator

    @robin-w

    nothing I know of does this.


    Robin W
    Moderator

    @robin-w

    none of this testd, but the actual adding of an image to the post would be something like

    add_action('bbp_template_before_single_topic', 'pym_print_featured_image_single_forum', 11);
    		
    	function pym_print_featured_image_single_forum() {
    		if (has_post_thumbnail()) {
    			echo '<div class="pym-bbp-topic-thumbnail">';
    			echo get_the_post_thumbnail(null, 'thumbnail' );
    			echo '</div>';
    		}
    	}

    adding featured topic to the backend would be something like

    add_post_type_support('topic', array('thumbnail'));

    Code could be written to allow the user to add an image, but that’s a chunk of work !!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar