• I’ve installed Podpress and it works great–except on single post views. Instead of the Flash player, I get the [display_podcast] code, not replaced as it should.

    Any ideas for how to work around this? Maybe the answer is to auto-insert the Podpress code at the beginning somehow, without having to type [display_podcast]? If so how?

    Any help much appreciated.

Viewing 15 replies - 16 through 30 (of 38 total)
  • Does Thesis use the function the_content()? Or can you tell how the post content is loaded in the single post view? Is there no single.php? Which looks at least a little bit like the single.php of the Twenty Ten theme? (https://core.trac.www.ads-software.com/browser/tags/3.0.1/wp-content/themes/twentyten/single.php – This file contains in line 30 a call of the function the_content(). This is a function of the WordPress core and it includes a hook called “the_content”. podPress uses this hook to get the post content and to replace the [display_podcast] placeholder with some lines of code during a page is loading.)

    Yes, you could try to replace the word “action” with “filter” in the lines 842 and 843 of the podpress.php. I will fix this in the next podPress version but until than:
    old:

    add_action('get_the_excerpt', array(&$podPress, 'insert_the_excerpt'), 1);
    add_action('the_excerpt', array(&$podPress, 'insert_the_excerptplayer'));

    new:

    add_filter('get_the_excerpt', array(&$podPress, 'insert_the_excerpt'), 1);
    add_filter('the_excerpt', array(&$podPress, 'insert_the_excerptplayer'));

    This is a repairing something. But maybe not the problem with the single post view.

    Please, change also line 841 in the way:
    old:

    add_action('the_content', array(&$podPress, 'insert_content'));

    new:

    add_filter('the_content', array(&$podPress, 'insert_content'));

    That could solve the problem eventually.

    Thread Starter johngorenfeld

    (@johngorenfeld)

    Thanks sir–will try that right away.

    Thread Starter johngorenfeld

    (@johngorenfeld)

    Still seems to be broken after the change. I wonder if I should just add some PHP code to the Single.php that displays a Flash player whenever there is an MP3 file associated with the post.

    I am not sure how the Thesis content hook works for single pages, but will look into it…

    Today, I found the https://thesishooks.com site and the manual of Thesis https://diythemes.com/thesis/rtfm/customizing-with-hooks/

    Maybe you could insert some lines like these:

    if (is_single()) {
    	add_action('thesis_hook_before_post', array(&$podPress, 'insert_content'));
    }

    into the podpress.php e.g. in line 844.

    In some examples for the usage of the Thesis hooks it is suggested that you should use remove_action (https://codex.www.ads-software.com/Function_Reference/remove_action) to remove other actions. It exists also the function remove_filter.
    Maybe you can find remove_action(‘the_content’) or remove_filter(‘the_content’) (maybe with double quotation marks) somewhere in the php files of the theme. That would eventually explain the problems, too.

    Thread Starter johngorenfeld

    (@johngorenfeld)

    Searching the Thesis theme PHP files..still trying to find anything like that.

    Thread Starter johngorenfeld

    (@johngorenfeld)

    Wonder if you’ve had any luck finding something like that in the Thesis code that I could disable? I’ll check the Thesis forums too, to see if they have an answer.

    I am having exactly the same problem. Good to know I’m not alone!

    Awaiting any/all updates…

    This Thesis forum thread suggests using Podcasting rather than Podpress, and adds that it detects everything from podpress:

    https://diythemes.com/forums/showthread.php?29747-podPress-audio-link-not-appearing-on-post-pages&highlight=podpress

    Not an ideal solution if you’re set on Podpress, but apparently, it does work with Thesis. :/

    @rosspruden – Do you have to be a paying customer to subscribe to that forum? The link requires registration.

    By the way, podpress was dead as far as development for a couple years which is why the Podcasting plugin was created in the first place. Now that development of podpress is continuing it might be a good idea to ask the Thesis devs to install the latest podpress (8.8.6 beta 4) and see if they can troubleshoot. I’m sure Tim would be open to fixing the problem if they gave him the theme to play with. Its kind of tough to troubleshoot when he doesn’t even have the theme…

    Just a thought.

    I have done some further reading and have new nice idea:

    Your thesis theme has probably a file which is called /thesis/custom/custom_functions.php. (The folder name is maybe different.)
    Insert the following code snippet into this file:

    add_action('thesis_hook_before_post', 'podpress_thesis_action');
    function podpress_thesis_action($co) {
    	if (is_single()) {
    		GLOBAL $podPress, $post;
    		unset($podPress->tempContentAddedTo[$post->ID]);
    		echo $podPress->insert_content($co);
    	}
    }

    The code of this example would add the podPress player and the download links above the post content as the hook name suggests. is_single() limits this action to the single post views.

    If you want to position the podPress content below the post then use e.g. the thesis_hook_after_post hook. Here is a list of all Thesis hooks.

    You should set the podPress option Location at the general settings page of podPress to “End” and don’t use the [display_podcast] token in the post content because this workaround does not filter the content. It adds only the player at a certain player before or after the post.

    @raymer Yes, you do need to be a registered Thesis owner. Sorry. :/

    Didn’t know that about the Podcasting plugin. Interesting… Thanks! I may have to switch over, then.

    FYI, I tried the following instructions (lifted from the Thesis forums) to install the Podcasting plugin and it worked like a gem:

    I had the same issue. I installed the Podcasting plugin (named Podcasting), activated it and then deactivated Podpress. Podcasting detected and imported the data from Podpress and I only had to put in the Podcasting specific code to get the player to appear on both the home page and the individual blog post page.

    You have to click “Send to Editor” on the Podcasting widget on the blog edit screen to get the code into the post (this was non obvious to me). Once you know the format (which is not documented in the interface) you could do it by hand.

    @rosspruden and @johngorenfeld: Has one of you tried the code snippet I have posted above?

    The single post view of Peter Collins blog shows now the podPress elements.
    @johngorenfeld: Did you use the code snippet or an other solution. Would you tell us how you did it?

    Actually, no I didn’t try the snippet (though I much appreciated your input). I’m not quite as code savvy in PHP as others and have bungled it all up a few times by tweaking with any of the PHP. Sorry!

Viewing 15 replies - 16 through 30 (of 38 total)
  • The topic ‘Podpress won't work on single posts.’ is closed to new replies.