Scott@adszoom
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: what page.php is served when a page is not found?ya its not with in the theme if you do something like this
https://www.adszoom.com/tweet you get an error. I have no plug in for redirect installed. I came across this by mistake. If someone dose use a bad /whatever it should go to page not found correct?
Forum: Fixing WordPress
In reply to: what page.php is served when a page is not found?Hi
Thanks but what other pages are pulled in with the default theme ?If someone can pointe me in the correct direction on any of these it will help me a grate deal.
Ha ok cool ya it was not grabbing the existing posts untill i changed the line 41 now it is and if you click it takes you to the correct view i need for single.php anyway i could not find the “the_content()” on search.php so i changed it there. So this code
<?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail(); } ?>
where exactly do i place this ? on search.php or content.php? where exactly ? new to wp so i have to ask these crazy simple questions but thanks for your help? just need complete walk threw on this one. If you have time..
thanks for your help on the other issue thu did contact the dev but like i said dont know if he or she will respond so i hacked and fixed..
its done works perfect here is the code
<?php /** * The default 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(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" 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(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" 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() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_excerpt( __( 'Continue reading <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; ?> <footer class="entry-meta"> <?php $show_sep = false; ?> <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> <?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 /* 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 'post' == get_post_type() ?> <?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(); ?> -->
its correct look on line 41 not 42 just change “content” with “excerpt” the goal was to get all existing posts to fall in line with the posts after the change and this worked perfect in the 2011 theme with 3.4.1 wp
was that right ? i think it was for the default 2011 the theme im working on is a child of that
I replaced it in the line 42 of content.php
Hi
ya i replaced line i think 42 in the content.php because i could not find ‘the_content()’ in search .php did i miss it? is that ok what i did in that code pice above? and this snippet you just posted will that show the thumb nail in the excerpt on search.php ? this on?
<?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail(); } ?>
that go’s in functions.php correct how do you call it? on search.php and will it also show the thumbnail if the category template is called?
in content.php correct because this edit search.php file, there is “the_content()”
replace with “the_excerpt()” is not on the search.php in the 3.4.1 ver wp
<?php else : ?> <div class="entry-content"> <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
like this ? works for me but just to conf… how about showing the thumb nail in the excerpt ?
Forum: Fixing WordPress
In reply to: Excerpts only for all posts<?php else : ?> <div class="entry-content"> <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
like this ? works for me but just to conf… how about showing the thumb nail in the excerpt ?
THANKS! hay quick question…. if i wanted just to show excerpts on these results page how do i change that real quick the problem is i changed to this new theme i built and there was about 12k posts already and the theme shows the full post ( no good ) on pre existing posts.
Any idea?
lol ya works like a charm how did you know?
I forgot to tell ya its a child of the 2011 theme…
Hi
Ya I changed 0 code from default 2011 theme but am using this plug in ” search by category ” by ” Fire G ” so i went to the PLUG IN’S site for more info and it was a mess nothing worked there as well so i think im going to find a better ” search by cat ” plug in and start there. If there are coding issues its there…… Do you have a better plug in for this off the top of your head ? Or should i just wright it my self?