Forum Replies Created

Viewing 15 replies - 31 through 45 (of 82 total)
  • Thread Starter 1200ug

    (@1200ug)

    I shall try these suggestions when I get home from work.

    Are there any ways to achieve this on my live site without affecting the functionality of it? Like by perhaps creating a secondary dummy site? I don’t to affect the functionality of my site, even for 20 minutes. Running on localhost I do not get these problems.

    Thread Starter 1200ug

    (@1200ug)

    This is content.php, I think which is doing all the styling, and showing the “Continue reading” text.

    <?php
    /**
     * Template for displaying content
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header">
    			<?php if ( is_sticky() ) : ?>
    				<hgroup>
    					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    					<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
    				</hgroup>
    			<?php else : ?>
    			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    			<?php endif; ?>
    
    			<?php if ( 'post' == get_post_type() ) : ?>
    			<div class="entry-meta">
    				<?php twentyeleven_posted_on(); ?>
    			</div><!-- .entry-meta -->
    			<?php endif; ?>
    
    			<?php if ( comments_open() && ! post_password_required() ) : ?>
    			<div class="comments-link">
    				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
    			</div>
    			<?php endif; ?>
    		</header><!-- .entry-header -->
    
    		<?php if ( is_search() | is_home() | is_archive() ) : // Edit this to show excerpts in other areas of the theme?>
    				<div class="entry-summary">
    				<!-- This adds the post thumbnail/featured image -->
    					<div class="excerpt-thumb"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
    				<?php the_post_thumbnail('medium', 'class=alignleft'); ?></a></div>
    					<?php the_content('Continue reading '); ?>
    
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>
    
    		<footer class="entry-meta">
    			<?php $show_sep = false; ?>
    			<?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
    				if ( $categories_list ):
    			?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if categories ?>
    			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
    			<?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    				if ( $tags_list ):
    				if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    				<?php endif; // End if $show_sep ?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if $tags_list ?>
    			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
    
    			<?php if ( comments_open() ) : ?>
    			<?php if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    			<?php endif; // End if $show_sep ?>
    			<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
    			<?php endif; // End if comments_open() ?>
    
    			<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post-<?php the_ID(); ?> -->

    I think the problem is on line 35, I need to tell it to display this on the new page template I’ve just created. testPage.php is the template for the ‘test’ page that I want to be static. Ive tried changing line 35 to include the ‘test’ page that I’ve created, so it shows on there also but that doesn’t work :/

    <?php if ( is_search() | is_home() | is_archive() | is_page( 'test' ) ) : // Edit this to show excerpts in other areas of the theme?>

    Thread Starter 1200ug

    (@1200ug)

    Ok, I have tried to take <?php get_template_part( 'content', get_post_format() ); ?> from the index, which cuts each post at the “Read more” point that I chose for the post, but when I use it for the wp_query, it displays the full post. I only want it to display the small first part, upto the Read more text.

    The code that I have so far is:

    <?php
    /*
    Template Name: Test
    */
    
    get_header(); ?>
    
    		<div id="primary">
    			<div id="content" role="main">
    
    				<?php $my_query = "showposts=3"; $my_query = new WP_Query($my_query); ?>
    				<?php if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    					<?php get_template_part( 'content', get_post_format() ); ?>
    
    				<?php endwhile; // end of one post ?>
    				<?php endif; //end of loop ?>
    
    				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    					<p>Not sure when this would be executed</p>
    
    				<?php endwhile; endif; ?>
    
    			</div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_footer(); ?>

    Thanks

    Thread Starter 1200ug

    (@1200ug)

    Twenty Eleven theme, downloaded from the dashboard.

    Created a child theme, and I am trying to customize the child theme.

    Thread Starter 1200ug

    (@1200ug)

    I wish I could delta posts because I realised I was on an archive page with only 3 posts on.

    I feel stupid!

    Resolved

    Thread Starter 1200ug

    (@1200ug)

    I was thinking of that, the only problem with that would be that I could not get the tortoise logo to overlap the navigation, and the title would not be present so less SEO friendly?

    Thread Starter 1200ug

    (@1200ug)

    I still cant figure out how to push both the logo and the title to the bottom of the header image. I have had a read of those articles, but neither mention how to achieve this πŸ™

    Thread Starter 1200ug

    (@1200ug)

    I have a very crude and not perfect solution of simply hiding the logo and text when the screen width is less than a certain height, but its not at all a final solution πŸ™

    @media only screen and (max-width: 1050px) {
        #header-logo { display: none; }
        #header-title{ display: none; }
    }

    Thanks for your advice in things to read. I’ll have a look now

    Thread Starter 1200ug

    (@1200ug)

    Thanks for the advice on absolute positioning, I don’t know how to do anything else though, my CSS knowledge is lacking.

    I don’t know how to set the header image as the background image of the div, I cant see why div the header image is stored in?

    Thread Starter 1200ug

    (@1200ug)

    And another question I have.

    When I place the nav bar to the top, and change its height to 100px, for example, the nav bar overlaps the header image, and decreases the actual image, rather than pushing it down to still show the full header image

    Thread Starter 1200ug

    (@1200ug)

    the 500px seemed to give me problems for some reason…

    When I try and place the bar at the bop (absolute:0), and then scroll downwards, the bar turns transparent. I have reset the css to .myfixed { margin:0 auto!important; float:none!important; border:0px!important; background:none!important; max-width:100%!important; }

    How can I fix the bar to the top as default, and allow the scrolling to take place as previously (not transparent)?

    Thread Starter 1200ug

    (@1200ug)

    Problem sorted, I should have placed the image in the parent theme, NOT the child theme.

    Thanks for all help.

    Resolved

    Thread Starter 1200ug

    (@1200ug)

    I’ve followed this similar thread, and I can now overlay the image, but the image does not load.

    I have placed the image in twentyeleven-child/images on my hard drive (local site) but when i try to view the image, it has the broken picture link, like the image does not exist. How can I add the image?

    Thread Starter 1200ug

    (@1200ug)

    Hey, sorry for the late reply, I’ve created a test page which can be found at the following link – http://goo.gl/kKCBnq

    I have been trying to mess around and overlay a div over the image (so I can put the logo actually over the header image), but cant figure out how to.

    Again, sorry for the late reply, I’ve been away the last few days.

    How do you make your homepage SEO friendly, if you are displaying your most recent posts? There is no static page to try and modify to become more SEO friendly, it’s just a page that is generated on demand.

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