Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • FYI, if you add display:none to the title using title_class, keep in mind that that element simply disappears. An alternative is to use the visibility property to hide it but retain it, like so:
    visibility: hidden;

    I found I needed to retain but hide it when my category excerpts with thumbnails weren’t aligning properly; when the excerpt was short, the thumbnails disturbed the next entry. By keeping the title element but hiding it, it forces a line break to ensure that the next entry isn’t disturbed. (A little like in a post when the next header forces a new line below an image, instead of a wrap around it.)

    @mattyrob you’re the best.

    Yep @mattyrob – that last fix took care of it on my weekly digests.

    @clovis, the functionality comes from the php, which composes the page. The CSS styles it – which means you can change the color, font, etc., incl. making it disappear (‘display:none’) but you can’t change the text.
    I never did figure out why I couldn’t make it work as I wanted it to.

    BTW, when you put a php in your child theme (very handy) you only add to it the function you want – not replicate the whole parent functions.php in the child theme folder. Future reference.

    I too wanted my image thumbnail right-aligned in the post text, below the title. I did it by wrapping the title generation in paragraph tags and locating the thumbnail call to the excerpt line, using paragraph tags again to inline-style the image.

    I hope this helps someone struggling to style thumbnails which out of the box are not styled.

    <?php
    				if (
    					function_exists('the_post_thumbnail') &&
    					current_theme_supports("post-thumbnails") &&
    					$instance["thumb"] &&
    					has_post_thumbnail()
    				) :
    			?>
    				<p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"></p>
    				</a>
    			<?php endif; ?>
    // inserts date
    			<?php if ( $instance['date'] ) : ?>
    			<p class="post-date"><?php the_time("j M Y"); ?></p>
    			<?php endif; ?>
    // Inserts thumbnail after title in post text aligned right with flow
    			<?php if ( $instance['excerpt'] ) : ?>
    <p style="float:right"><?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?>
    			<?php the_excerpt(); ?></p>
    			<?php endif; ?>

    @solsyd,

    I should point out that I’m using a custom theme (based on the default twenty eleven) that adds sidebars to single-posts, FWIW. The default twenty eleven theme did not, which irked some upgraders to WP 3x who did use that theme. The twenty eleven with sidebars version makes single-post sidebar possible.

    So maybe that makes a difference? Though I’d expect the sidebar call to work regardless. But I’m no php expert!

    Also, great looking events list page. On Firefox at least, I see that you’ve got no margins on the single event page. I remembered that I had to do some CSS work to make the event single-page view workable; it involved margin tweaks. I used Firebug to inspect and tweak, then coded those changes into the child theme CSS file I made for the Events plugin.

    I am a little unsure about where this should happen:
    At the bottom before the footer is called, insert the code:
    <?php get_sidebar(); ?>
    I have done a quick scan of the four files and can’t see where it should go.

    At the very bottom of single.php you’ll see the footer call. When you insert that sidebar call it will look like this:

    </div><!-- #content -->
    		</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Hope that helps….

    The above fix for 18-21, 23-29 and 126-128 only partially worked for me: the 126-128 block DIDN”T work, producing multiple entry days/times, while block 23-29 did work to both fix the checkbox and hide the events entry form until the radio button was checked.

    This is a nice fix for when we set the start date but forget to set the end date – putting the end before start of the event. In case of all-day events, the end date is simply reset to the start date. For one-day timed events, the fix will simply set the end to start date keeping the set times. For timed events spread over days, the fix will just show the start day/time of the event.

    The code when inserted into list.php looks like this:

    <table>
    		                  <tr>
    		                    <td class="tec-event-meta-desc"><?php _e('Start:', $spEvents->pluginDomain) ?></td>
    		                    <td class="tec-event-meta-value"><?php echo the_event_start_date(); ?></td>
    		                  </tr>
    <?php if(the_event_start_date() !== the_event_end_date()): ?> // added to reset erroneous end date if earlier than start
    		                  <tr>
    		                    <td class="tec-event-meta-desc"><?php _e('End:', $spEvents->pluginDomain) ?></td>
    		                    <td class="tec-event-meta-value"><?php echo the_event_end_date(); ?></td>
    		                  </tr>
    		                  <?php
    <?php endif; ?>
    		                    $venue = the_event_venue();
    		                    if ( !empty( $venue ) ) :
    		                  ?>

    I wonder if the WP update that might be causing this problem also causes behavior where an edited event post forgets the date/time settings?

    >Actually found the reason for this error and the fix for anyone still encountering this issue:
    >http://wordpress.stackexchange.com/questions/22317/the-events-calendar-issues-in-wp-3-2

    Didn’t work for me. The date reproduced four times, as experienced by a poster on that page.

    Just to clarify, here are the steps:

    Create an ‘Events’ folder in your child theme’s directory;
    Copy the events.css file from the plugin into it (to style the events pages);
    Copy three files into it from the plugin’s ‘views’ folder –
    single.php
    list.php
    event-list-load-widget-display.php

    At the bottom before the footer is called, insert the code:
    <?php get_sidebar(); ?>

    Tnanks @alchymyth. I saw that tip when reading about the <more> tag, and tried to implement it myself…but wasn’t clear enough how to insert the example code in the actual statement in content.php. Not knowing php I tripped myself up.

    So I inserted this code but still see the default ‘Continue reading’ behavior. No post titles. Can I append the code? I checked that the content.php is in the child theme.

    Thanks in advance if you have the opportunity.

    On an unrelated quick question, in Twenty Eleven, I’ve applied a background color to post titles (<class “entry-title”> which looks great, but wanted to have a rollover highlight (brighter color). Naturally I though I could style .entry-title a:hover with a background color but of course it ends with the link text – not the whole bar as I’d hoped. I want the whole <entry-title> element to have hover behavior. No go, eh?

    OK – enough!

    </header><!-- .entry-header -->
    <?php global $more; if( $wp_query->current_post <= 2 && !is_paged() ) { $more = -1; } else { $more = 1; }  ?>
    		<?php if ( is_search() || $wp_query->current_post > 2 || is_paged() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    		<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    <?php the_content( __( 'Continue reading [' . get_the_title($post->ID) . '] <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',  'after' => '</div>' ) ); ?>
    
    		</div><!-- .entry-content -->
    		<?php endif; ?>

    You might try the codex about the ‘read more’ link.

    I’ve been trying to customize my own ‘continue reading’ link in my child theme’s content.php using the “get_the_title” function in the codex with no success.

    The key bit seems to be here:
    <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    It comes a few lines after the </header><!-- .entry-header --> bit.

    I’ve inserted the get_the_title function to return a result like “continue reading [post title]” (with the template’s little nav arrow) intact but whatever changes I make in my content.php aren’t reflected in the front end. When I botch the code I do get an error, though; I just can’t seem to affect the ‘continue reading’ text.

    I’ve even tried mucking with it in the parent theme’s content.php. Is it called from some other doc? Any help will be appreciated…especially a code snipped that would show how to insert the get_the_title function, which I would EXPECT to read like this:

    <?php the_content( __( 'Continue reading <?php get_the_title($post); ?> <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>

    Thanks!

    Thread Starter Mrmark

    (@mrmark)

    Hello @alchymyth

    Thanks again for the quick reply. Again, works like a charm.

    I had not thought to look to the codex for the read more tag (thanks!). I didn’t guess it went to he fine-grain of ‘read more.’ (I come from Joomla!). Documentation for WP is so good and easy to use; ww.wp.xz.cn is a first-class setup.

Viewing 15 replies - 1 through 15 (of 18 total)