Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1648
    J Mucc
    Participant

    I need the attachment to show up on the front page “Excerpt” but it only shows when you click on the post itself. Blog is set to display full posts on the main page. Need to be ultra simple for end users, ie no short code, just point and click! Thanks!

    #1663
    Bartosz
    Keymaster

    If you want it to be that simple than you need to code it in your theme. Just read the shortcodes documentation and use it in your theme with the do_shortcode() function or take a look at functions shipping with the plugin (located in includes/functions.php).

    #3279
    Tomaek
    Participant

    Mam ten sam problem. Bartku może będdziesz mi w stanie pomóc ? Nie znam dokładnie PHP a w dodatku używam szablonu o dziwnej strukturze plików. Chętnie udostępnie wszystkie dane i niezbędne kody.

    #3287
    Bartosz
    Keymaster

    Ok guys. This piece of code will add attachments list after post excerpt on all archive pages. Paste this into functions.php of your themes and modify according to your needs.

    function downloads_after_get_the_excerpt($excerpt) {
    	if (is_archive()) {
    		$excerpt .= da_display_download_attachments();
    	}
    	return $excerpt;
    }
    add_filter('get_the_excerpt', 'downloads_after_get_the_excerpt');
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.