Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Hugh Lashbrooke

    (@hlashbrooke)

    To be honest, I’m not too sure what you’re asking for here. There are filters available to help you manipulate the file URL, so you’ll probably be able to do what you want, but you’ll need to provide some more clarity for me.

    Thread Starter darryl505

    (@darryl505)

    sure ill give more clarity. When i go to post an episode there is a section there where i can type in the url of the file location for the mp3 file.

    Is there any way i can go into the code and make it so that https://adrpodcast.com/ is already filled in ?

    Plugin Contributor Hugh Lashbrooke

    (@hlashbrooke)

    OK I see. Yes – it is entirely possible to do that. If you add this snippet to your theme’s functions.php file then that URL will be filled in the audio file field by default:

    add_filter( 'ssp_episode_fields', 'darryl505_ssp_default_audio_file_url', 10, 1 );
    function darryl505_ssp_default_audio_file_url ( $fields ) {
    	$fields['audio_file']['default'] = 'https://adrpodcast.com/';
    	return $fields;
    }

    If this has helped you then please consider supporting continued development by leaving a review ??

    Cheers,
    Hugh

    Thread Starter darryl505

    (@darryl505)

    absolutely.. DONE!

    Thread Starter darryl505

    (@darryl505)

    Hugh, Thank you again for this.. I just found a problem that I had not contemplated until now. With hard coding part of a location. When hosts are making a regular posts that does not have a podcast in it.. There is a link down at the bottom and something that says “download file” with an error when its clicked because there is no file at that location. Any way to further modify the code so that if there is no actual file i get no link?

    An example would be here
    https://alldigitalradionetwork.com/test-post/

    Darryl

    Plugin Contributor Hugh Lashbrooke

    (@hlashbrooke)

    I see the issue here. To fix it you’ll have to create a custom function that does not save the audio file URL if it’s value is the same as the default value that you have already added. It is quite far beyond the scope of this support forum to offer that so I would recommend hiring a developer to handle it for you.

    Cheers,
    Hugh

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hard Coding File Location?’ is closed to new replies.