Forum Replies Created

Viewing 15 replies - 31 through 45 (of 306 total)
  • I’ve got it posting multiple players https://ratest3.com/podcast/ I’m just not clear on the use of the_content or posting images.

    I have one more question for you both.

    I’ve got the player… and title of each episode post. When I use either the_content or the_excerpt I don’t get what is in the text editor for that post ALONE, I get whats in the text editor of that post AND the meta info for the media file. Here is a screen shot

    https://ratest3.com/wp-content/uploads/2013/07/AngierPlay2.jpg

    jolaedana, When I use your code (except pulling in 6 posts vs 1) I get duplicates of the meta – one of which is with the content of the post itself.

    <?php $query = new WP_Query( array( 'post_type'=>'podcast', 'posts_per_page' => 6 ) );
    while ($query->have_posts()) : $query->the_post();
    ?>
    <?php the_title(); ?>
    <div id="audio">
    <?php global $ss_podcasting;
    $enclosure = $ss_podcasting->get_enclosure( get_the_ID() );
    if( $enclosure ) {
        $audio_player = $ss_podcasting->audio_player( $enclosure );
        echo $audio_player;
    } ?>
    <?php the_content(); ?>
    </div>
    <div id="audioinfo">
    <a class="button" href="<?php echo get_post_meta(get_the_ID(), 'enclosure', true) ?>">Download Audio</a>
    <span class="audiometa">
    Duration: <?php echo get_post_meta(get_the_ID(), 'duration', true) ?> | Size: <?php echo get_post_meta(get_the_ID(), 'filesize', true) ?>
    </span>
    </div>
    <?php endwhile; ?>
    			<div class="podcast_clear"></div>

    I get the same result whether I use the_content or the_excerpt with the code I’m using on my template file;

    <?php  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $query = new WP_Query( array( 'post_type'=>'podcast', 'paged' => $paged, 'posts_per_page' => 6,   ) );
    while ($query->have_posts()) : $query->the_post();
    ?>
    
    <div class="podcast">
    						<h2 class="audio-title"><?php the_title(); ?></h2>
                           <div class="audio-info"> <?php the_excerpt(); ?></div>
    <div id="audio">
    <?php global $ss_podcasting;
    $enclosure = $ss_podcasting->get_enclosure( get_the_ID() );
    if( $enclosure ) {
        $audio_player = $ss_podcasting->audio_player( $enclosure );
        echo $audio_player;
    } ?>
    </div><!-- audio -->
    
    <span class="audiometa">
    Duration: <?php echo get_post_meta(get_the_ID(), 'duration', true) ?> | Size: <?php echo get_post_meta(get_the_ID(), 'filesize', true) ?>
    </span>
    </div><!-- podcast -->
    <?php endwhile; ?>
                <div class="clear"></div>
    <?php posts_nav_link(); ?>

    Is there something I’m misunderstanding about using the_content/the_excerpt when using this plugin?

    I also can not insert an image in the text editor using the ‘Add Media’ button.

    Ok, I got it worked out ?? THANKS!

    jolaedana –

    Is there meant to be a <?php endwhile; ?> at the end of that? It threw an error for me without it.

    Did you just drop this on a standard ‘archive’ template? I’m not getting the player still. I changed the series to one I created and made sure at least two post were categorized as that. I tried it without the series in it.

    This is what I’m using on that template named archive-podcast in my child 2012 theme folder:

    <?php
    /**
     * Template for podcast archive pages
     *
     * @package WordPress
     * @subpackage SeriouslySimplePodcasting
     * @author Hugh Lashbrooke
     * @since 1.0.0
     */
    
    get_header(); ?>
    
    	<section id="primary" class="site-content">
    		<div id="content" role="main">
    <?php $query = new WP_Query( array( 'post_type'=>'podcast', 'series'=>'sermons', 'posts_per_page' => 1 ) );
    while ($query->have_posts()) : $query->the_post();
    ?>
    <?php the_title(); ?>
    <div id="audio">
    <?php global $ss_podcasting;
    $enclosure = $ss_podcasting->get_enclosure( get_the_ID() );
    if( $enclosure ) {
        $audio_player = $ss_podcasting->audio_player( $enclosure );
        echo $audio_player;
    } ?>
    <?php the_content(); ?>
    </div>
    <div id="audioinfo">
    <a class="button" href="<?php echo get_post_meta(get_the_ID(), 'enclosure', true) ?>">Download Audio</a>
    <span class="audiometa">
    Duration: <?php echo get_post_meta(get_the_ID(), 'duration', true) ?> | Size: <?php echo get_post_meta(get_the_ID(), 'filesize', true) ?>
    </span>
    </div>
    <?php endwhile; ?>
    
    			<div class="podcast_clear"></div>
    		</div><!-- #content -->
    	</section><!-- #primary -->
    
    <?php get_footer(); ?>

    And I created a unique header file to make sure the page had the ‘single’ classes (if that is at all relevant) and tried that as well.

    I’ve also tried it with and without <?php the_content(); ?>

    I did try two other audio plugins BEFORE this one, and they have been deactivated and deleted from the plugin library. I have also deactivated the other 6 plugins to be sure this isn’t the problem.

    Did a hard refresh and tried it in another browser. LOL. ??

    https://ratest3.com/podcast/

    I will give it a go jolaedana – and promise to pay it forward. Thanks! ??

    My php is also a work in progress, so I humbly ask, where exactly do we use the code to load the audio player? ??

    I’m trying to see the all the players in the ‘archive’ template I’m working on, and not have to go to single view to see the individual player.

    I started out using this, but then I tried jolaedana’s code up top. I tried sticking that code to load the audio player everywhere (LOL).

    <?php $args = array( 'post_type' => 'podcast', 'posts_per_page' => 10 );
    $loop = new WP_Query( $args );
    
    while ( $loop->have_posts() ) : $loop->the_post();
    	the_title();
    
    	echo '<div class="entry-content">';
    	the_content();
    
    	echo '</div>';
    endwhile;
    ?>
    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    ???

    /*–
    Theme Name: theme1847
    Theme URI: https://template-help.com/
    Description: A theme for WordPress 3.2+ from Template-Help.com Collection
    Author: Template_Help.com
    Author URL: https://www.Template-Help.com/
    –*/

    https://www.templatemonster.com/help/template-help-com/

    And here is the license that came with it: https://barnyarddesigner.com/wp-content/themes/theme1847/license.txt

    And let me say again, I’m not coming here asking the www.ads-software.com forum community members or it’s moderators to FIX something, I was comparing this theme’s functionality to another and had general questions about the use of https://codex.www.ads-software.com/Function_Reference/get_template_directory_uri or this https://codex.www.ads-software.com/Function_Reference/bloginfo and how multiple style sheets on a parent get handled in a child. :-\

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Ok, perhaps TemplateMonster should out right state their themes are not GPL… cuz that’s where we got it from. :-\

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    WPyogi – nooooo, no sir, I did not. And that is why I come here to ask questions. So I can learn.

    All I know is most posts I’ve found in regards to modifying the look of a theme include someone posting “DON’T EDIT THE THEME, MAKE A CHILD THEME!!!”.

    I didn’t come here to ask for ‘support’ as in ‘someone please fix this for me’. I came here to learn something. I pulled apart this theme because I was curious about how it was doing the resizing for handhelds compared to another responsive theme I’ve got. When I set up a child theme that’s when I noticed how all the style sheets were being called in.

    https://www.ads-software.com/support/topic/is-it-possible-to-edit-html-in-a-child-theme?replies=8

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Oooook then. I’ll start another thread about best practices dealing with multiple parent style sheets in child themes. :-\

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Paul – I got the theme from a ‘trusted source’ :-\

    Are you saying if you are creating a child theme (from whatever parent theme) or if you are hacking a theme, you can’t ask general questions that are in regards to using WordPress functions here on this forum?

    So with a child theme activated, you need to have a copy over of the whole parent’s style.css in child theme folder AND the images folder with the same set of images.

    Yes, I created a child directory, uploaded a copy of the style.css and the images folder (after editing the color of the images) to the child directory.

    THEN I copied header.php into the child theme’s folder and have been trying to figure out WHAT FUNCTION to use to use to get it to call all the style sheets from the child theme folder.

    https://codex.www.ads-software.com/Function_Reference/bloginfo

    ‘template_url’ / ‘template_directory’ – URL of the active theme’s directory (‘template_directory’ was a local path before 2.6; see get_theme_root() and get_template() for hackish alternatives.) Within child themes, both get_bloginfo(‘template_url’) and get_template() will return the parent theme directory. Consider echoing get_template_directory_uri() instead (for the parent template directory) or get_stylesheet_directory_uri() (for the child template directory).

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Ok, simply putting a copy of header.php in the child theme folder is not changing the directory of the images being used when the site gets scaled down to ‘hand held’ size. :-\

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    I’m not hugely experienced in this so I have to ask, then what is the ‘correct’ way to resolve this?

    I created a child theme and started with the style sheet and the images folder (so I could change the color scheme).

    All other files are in the parent theme. The header is calling all these style sheets using exactly this:

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/normalize.css" />
    	<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    	<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/skeleton.css" />
    	<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/touchTouch.css" />
    	<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/768.css" />

    Does that mean I need to save a copy of header.php to my child theme folder?

    I have a question.

    The purpose of a child theme is so the parent theme can be updated for whatever reason, bugs/errors, security, etc.

    Maybe the about.php file isn’t all that critical. But let’s say you want to make changes to the header.php because you want to totally reconstruct the header div (what’s the point in using display:none; if you don’t even need the data being brought in). The file header.php contains some pretty important info like jQuery, etc.

    So lets say you edit header.php for whatever reason – and the theme author makes an update. I’m just going to ask the stupid question here… at that point I assume the person who created the child theme would have the responsibility to know that the parent theme had been updated and to check/compare any child theme files for edits?

    So you’d first want to try to make any changes (if possible) in the CSS and then modify any html, then any php. Eh?

    I’m just mostly talking out loud to wrap my head around child themes. I’ve never had a parent theme updated so I don’t know.

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Well this issue may be old, but it isn’t gone.

    I still have to use a plugin so my WP install sends email out to my Google Apps. There are very relative threads about it.

Viewing 15 replies - 31 through 45 (of 306 total)