• Resolved bob cavanaugh

    (@bobdavcav)


    Hi all,
    I’ve asked this question at least twice before, but it has gone unanswered and I’d like to get this fixed in the next few weeks before school starts again. I’m having two problems,
    1. When I try to imbed audio into a post, it says it’s attached to the post, but when I click “Insert into post”, no imbed code shows up. Isn’t that link supposed to imbed the player automatically and why isn’t it if it is supposed to? I’ve ended up inserting the audio player code manually.
    2. I’m still having issues with the child theme I’m writing. I modified loop.php to add the home page to the display excerpts on the home page, but it’s still not working. I replaced “if is_archive is_search display excerpts for archives and search” with “if is_home is_archive is_search display excerpts for home page, archives, and search” that’s not the exact code, but I think you get where I’m going, I added the additional () and whatever else I needed to, but when I upload the theme to my website, it gives a failure notice and fails to activate the theme. What’s wrong? If you need the exact code to help me, I’m not sure how I can get that to you, I was going to paste in a pastebin about a week ago, but posting the entire loop.php file triggers the automatic spam filter requiring a captcha which is not screen reader accessible.

Viewing 15 replies - 1 through 15 (of 15 total)
  • I modified loop.php to add the home page to the display excerpts on the home page

    No. Did you read http://codex.wordpress.org/Creating_a_Static_Front_Page

    Never ever change a core file.

    When I try to imbed audio into a post, it says it’s attached to the post, but when I click “Insert into post”, no imbed code shows up. Isn’t that link supposed to imbed the player automatically and why isn’t it if it is supposed to?

    No. If it is an mp3/4 WordPress doesn’t need a player, just the video.

    Thread Starter bob cavanaugh

    (@bobdavcav)

    Keith, first off I want to thank you for putting up with the fact that I was getting a little annoyed last night and taking the time to help me. Now down to business, you wrote in one of the other threads “Where does this say anything about the loop?” Your link was to the page on child themes, which does not say anything about the loop, I was going off of the info in this thread but it isn’t working. The new child theme won’t activate and I’m out of ideas. At first, it appeared that the two lines I needed to edit were dramatically different from one another, so I fixed that once, tried again, still didn’t work, tweaked something else in the code to make sure both lines were the same since they should be, and tried again with no luck. On Christmas eve, I looked again and found an extra tab at the beginning of one of the lines that was causing part of the code to be on the line below. Upon fixing this I tried again to activate the child theme but still no luck, and I’m out of ideas.
    On the audio player issue, so what you’re saying is that it is working correctly? I think you saw the steps I perform when embedding the file, but they’re not working. When I upload the file to the post, it says it’s attached but when I click insert into post nothing happens and I have to type the imbed code manually for each file in order to get the media player to show up on the page. Is that how it’s supposed to work or am I missing something?

    As far as I can tell you are doing the audio correctly. I have a test site, http://test.savethecolors.com/ and switched to your theme with no plugins and all functioned as normal. Have you tried it with a different browser?

    Do a wp search for Showing Post Excerpts on Main Page as alchymyth suggested. I looked and there is a lot of information.

    Thread Starter bob cavanaugh

    (@bobdavcav)

    What browser are you using? I had Internet Explorer 10 when I first started the site, but the night I started the site, I got a push which upgraded my browser to Internet Explorer 11. Both versions have the same problem.

    I used both IE11 and Chrome and they worked.

    Delete the wp-includes and wp-admin folders. DO NOT touch the wp-content folder. Download a fresh copy of 3.8 and upload the wp-includes and wp-admin folders. Don’t copy over. Delete and upload.

    Use ftp. http://codex.wordpress.org/FTP_Clients

    Thread Starter bob cavanaugh

    (@bobdavcav)

    Thanks, I’ll try deleting the two folders you suggested tomorrow as it’s nearly 9:30 here, about when I start to head for bed. I did change entry-content to entry-summary in a couple places per this thread but still no luck with my theme. I think I’m at a point where I need someone to see the code in order to help me as I know sort of what I’m doing but have no idea what’s wrong.

    Thread Starter bob cavanaugh

    (@bobdavcav)

    Ok that’s odd. The audio player thing could have been working all along without me realizing it. I’ll check that out on Friday when I post my next clip, the first one of the new year. I’m going to send you via email the theme files I’ve edited. If you can’t help, could you please post them in pastebin and put links to them in this thread so someone else can? Thanks.

    Please don’t send my email. I don’t know about anything you are editing.
    You post theme in paste bin.

    Thread Starter bob cavanaugh

    (@bobdavcav)

    Ok since I can’t get past the spam filter on pastebin, here’s my loop.php. Could someone help please?

    <?php
    /**
     * The loop that displays posts.
     *
     * The loop displays the posts and the post content. See
     * http://codex.wordpress.org/The_Loop to understand it and
     * http://codex.wordpress.org/Template_Tags to understand
     * the tags used in it.
     *
     * This can be overridden in child themes with loop.php or
     * loop-template.php, where 'template' is the loop context
     * requested by a template. For example, loop-index.php would
     * be used if it exists and we ask for the loop with:
     * <code>get_template_part( 'loop', 'index' );</code>
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    ?>
    
    <?php /* Display navigation to next/previous pages when applicable */ ?>
    <?php if ( $wp_query->max_num_pages > 1 ) : ?>
    	<div id="nav-above" class="navigation">
    		<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
    	</div><!-- #nav-above -->
    <?php endif; ?>
    
    <?php /* If there are no posts to display, such as an empty archive page */ ?>
    <?php if ( ! have_posts() ) : ?>
    	<div id="post-0" class="post error404 not-found">
    		<h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
    		<div class="entry-content">
    			<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
    			<?php get_search_form(); ?>
    		</div><!-- .entry-content -->
    	</div><!-- #post-0 -->
    <?php endif; ?>
    
    <?php
    	/* Start the Loop.
    	 *
    	 * In Twenty Ten we use the same loop in multiple contexts.
    	 * It is broken into three main parts: when we're displaying
    	 * posts that are in the gallery category, when we're displaying
    	 * posts in the asides category, and finally all other posts.
    	 *
    	 * Additionally, we sometimes check for whether we are on an
    	 * archive page, a search page, etc., allowing for small differences
    	 * in the loop on each template without actually duplicating
    	 * the rest of the loop that is shared.
    	 *
    	 * Without further ado, the loop:
    	 */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    
    <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?>
    
    	<?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    			<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    			<div class="entry-meta">
    				<?php twentyten_posted_on(); ?>
    			</div><!-- .entry-meta -->
    
    			<div class="entry-content">
    <?php if ( post_password_required() ) : ?>
    				<?php the_content(); ?>
    <?php else : ?>
    				<?php
    					$images = twentyten_get_gallery_images();
    					if ( $images ) :
    						$total_images = count( $images );
    						$image = array_shift( $images );
    				?>
    						<div class="gallery-thumb">
    							<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a>
    						</div><!-- .gallery-thumb -->
    						<p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ),
    								'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
    								number_format_i18n( $total_images )
    							); ?></em></p>
    				<?php endif; // end twentyten_get_gallery_images() check ?>
    						<?php the_excerpt(); ?>
    <?php endif; ?>
    			</div><!-- .entry-content -->
    
    			<div class="entry-utility">
    			<?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
    				<a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
    				<span class="meta-sep">|</span>
    			<?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ) && in_category( $gallery->term_id ) ) : ?>
    				<a href="<?php echo get_category_link( $gallery ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
    				<span class="meta-sep">|</span>
    			<?php endif; ?>
    				<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    				<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    			</div><!-- .entry-utility -->
    		</div><!-- #post-## -->
    
    <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>
    
    	<?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) )  ) : ?>
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    	<?php if ( is_home() || is_archive() || is_search() ) : // Display excerpts for home page, archives, and search. ?>
    			<div class="entry-summary">
    				<?php the_excerpt(); ?>
    			</div><!-- .entry-summary -->
    		<?php else : ?>
    			<div class="entry-summary">
    				<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
    			</div><!-- .entry-content -->
    		<?php endif; ?>
    
    			<div class="entry-utility">
    				<?php twentyten_posted_on(); ?>
    				<span class="meta-sep">|</span>
    				<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    				<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    			</div><!-- .entry-utility -->
    		</div><!-- #post-## -->
    
    <?php /* How to display all other posts. */ ?>
    
    	<?php else : ?>
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    			<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    			<div class="entry-meta">
    				<?php twentyten_posted_on(); ?>
    			</div><!-- .entry-meta -->
    
    	<?php if ( is_home() || is_archive() || is_search() ) : // display excerpts for home page, archives, and search. ?>
    			<div class="entry-summary">
    				<?php the_excerpt(); ?>
    			</div><!-- .entry-summary -->
    	<?php else : ?>
    			<div class="entry-summary">
    				<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
    				<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    			</div><!-- .entry-content -->
    	<?php endif; ?>
    
    			<div class="entry-utility">
    				<?php if ( count( get_the_category() ) ) : ?>
    					<span class="cat-links">
    						<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
    					</span>
    					<span class="meta-sep">|</span>
    				<?php endif; ?>
    				<?php
    					$tags_list = get_the_tag_list( '', ', ' );
    					if ( $tags_list ):
    				?>
    					<span class="tag-links">
    						<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    					</span>
    					<span class="meta-sep">|</span>
    				<?php endif; ?>
    				<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    				<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    			</div><!-- .entry-utility -->
    		</div><!-- #post-## -->
    
    		<?php comments_template( '', true ); ?>
    
    	<?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
    
    <?php endwhile; // End the loop. Whew. ?>
    
    <?php /* Display navigation to next/previous pages when applicable */ ?>
    <?php if (  $wp_query->max_num_pages > 1 ) : ?>
    				<div id="nav-below" class="navigation">
    					<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
    					<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
    				</div><!-- #nav-below -->
    <?php endif; ?>

    Please don’t paste large amounts of code here. Use paste bin or other services like that.
    http://codex.wordpress.org/Forum_Welcome#Posting_Code

    While there is some support for changes to source code here, I would say the majority of us never resort to that so support can be iffy. I did add some tags and maybe that will help.

    I also Googled how to post excerpts on home page and there where quiet a few hits.

    Thread Starter bob cavanaugh

    (@bobdavcav)

    Thanks for adding the tags. I’ve added my theme to the tags hoping to get some more help. I’ve linked to a couple threads that I’ve found, one by searching and one that I was directed to when I asked how to display excerpts on the home page of my theme on this forum a month or so before I started my site. Now, though, I’ve tried those tips and can’t get them to work for me. About posting code, I thought I made it clear that I am totally blind and that posting my php file triggers the spam filter on pastebin, requiring filling out one of those visual captchas that are not accessible. That’s why I sent you my theme files for you to post for me.

    Thread Starter bob cavanaugh

    (@bobdavcav)

    Ok, after doing some checking after a theme question earlier today, I’ve decided to rework my child theme, but I still can’t get it to work. I did try though to install 1 theme file at a time in hopes of troubleshooting, and the problem wasn’t loop.php, but it appears to be style.css. Am I supposed to copy the entire stylesheet of the parent theme into the style.css file of the child theme and then make my changes, or do I put my code in the style.css file in the child theme and the rest of it is supposed to be picked up by the parent? Here’s the style.css file I just wrote.
    /*
    Theme Name: Bob’s Airchecks
    Theme URI: http://bobsairchecks.x10host.com
    Description: This theme provides consistancy throughout when displaying posts, as well as alters each post’s footer.
    Author: Bob Cavanaugh
    Author URI: http://bobdavcav.wordpress.com
    Template: twentyten
    Version: 1.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: bobs_airchecks
    */

    @import url(“http://bobsairchecks.x10host.com/wp-content/themes/twentyten/style.css&#8221;);

    /* =.entry-utility-prep, .cat-links, .meta-sep {
    display:none;
    }

    ————————————————————– */

    do I put my code in the style.css file in the child theme and the rest of it is supposed to be picked up by the parent?

    Yes. The child theme will load last and override styles in style.css or add styles.

    Thread Starter bob cavanaugh

    (@bobdavcav)

    That’s what I thought. So, why isn’t it working?

    Thread Starter bob cavanaugh

    (@bobdavcav)

    Success!!!!! I got it working! The problem, as I mentioned earlier wasn’t loop.php at all, it was style.css. The code I copied was broken up into 3 lines instead of on a single line. Deleting the line breaks helped.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘audio player and theme, still having problems’ is closed to new replies.