Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

[SOLVED] How to control display of search results? Part 2


  #1  
Old Dec 13, 2010, 01:04 AM
lovin'wordpress
 
21 posts · Sep 2010
Australia
Hello,

I have the exact same question and would like the same result as to not have the "post-byline" and "post-footer" show up in search results. Based on the thread:

http://forum.bytesforall.com/showthread.php?t=610

I tried following the steps but maybe in Atahualpa 3.5.3, the coding might have changed, I don't know, because I can't find what Flynn was talking about. What I see for the index.php file is this:

Code:
<?php 	/* get all options: */
# error_reporting(-1);
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
global $bfa_ata;
get_header(); ?>

<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] = 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>

	<?php /* This outputs the next/previous post or page navigation. 
	This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
	bfa_center_content($bfa_ata['content_above_loop']); ?>

	<?php /* The LOOP starts here. Do this for all posts: */
	while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>
	
		<?php /* Add Odd or Even post class so post containers can get alternating CSS style (optional) */
		$odd_or_even = (($bfa_ata['postcount'] % 2) ? 'odd-post' : 'even-post' ); ?> 

		<?php /* This is the actual Wordpress LOOP. 
		The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */
		bfa_center_content($bfa_ata['content_inside_loop']); ?>
						
	<?php /* END of the LOOP */
	endwhile; ?>

	<?php /* This outputs the next/previous post or page navigation and the comment template.
	This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
	bfa_center_content($bfa_ata['content_below_loop']); ?>

<?php /* END of: If there are any posts */
else : /* If there are no posts: */ ?>

<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_not_found']); ?>

<?php endif; /* END of: If there are no posts */ ?>

<?php bfa_center_content($bfa_ata['center_content_bottom']); ?>

<?php get_footer(); ?>

How do I apply what he has mentioned earlier in thread:
http://forum.bytesforall.com/showthread.php?t=610

and modify the code so that search results will have no "post-byline" and "post-footer"

the closest I got was this but I only can get 1 search result and not all search results:

Code:
<?php 	/* get all options: */
# error_reporting(-1);
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
global $bfa_ata;
get_header(); ?>

<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] = 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>

	<?php /* This outputs the next/previous post or page navigation. 
	This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
	bfa_center_content($bfa_ata['content_above_loop']); ?>

	<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?php } ?>

<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>

<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

</div><!-- / Post -->

<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
?>

<?php endif; /* END of: If there are no posts */ ?>

<?php bfa_center_content($bfa_ata['center_content_bottom']); ?>

<?php get_footer(); ?>

Any input would be great, thank you
  #2  
Old Dec 13, 2010, 04:14 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Yes things have changed and now it is easier. You can go to ato->Style & editCENTER COLUMN->The LOOP and put an 'if (!is_search() ) {..........}' around the sections you don't want to show up. The '!' is an NOT.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Dec 13, 2010, 07:24 AM
lovin'wordpress
 
21 posts · Sep 2010
Australia
Hi again, ok I'm real slow at this... but please show where would you input it since I want the "post-byline" and the "post-footer" to disappear only when a search is being done. Here's what I have in my LOOP:

Code:
<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Top'); ?>

<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>

<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?php } ?>

<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>

<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>

if ( !is_search() ) {<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>}

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>

</div><!-- / Post -->

Much appreciated
  #4  
Old Dec 13, 2010, 07:48 AM
lovin'wordpress
 
21 posts · Sep 2010
Australia
hi again juggledad,

You seem to be always helping me, I'll be offering a donation for your time. By the way, I figured it out anyway and am posting the code here in case anybody else is interested to know:

This is how to get rid of the "post-byline" and the "post-footer" details if you don't want it to show up on your search results page with Atahualpa 3.5.3. Thanks to juggledad for supplying the solution:

Code:
<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Top'); ?>

<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>

<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?php } ?>

<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>

<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>

<?php
if (!is_search() ) {
bfa_post_byline('<div class="post-byline">','</div>');
}
?>

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

<?php
if (!is_search() ) {
bfa_post_footer('<div class="post-footer">','</div>');
}
?>

</div><!-- / Post -->

Bookmarks

Tags
post-byline, post-footer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Results kpkes@yahoo.com Center area post/pages 4 Jul 16, 2012 02:57 AM
[SOLVED] How to control display of search results? upscho Post-Kicker, -Byline & -Footer 6 Oct 20, 2010 02:15 PM
[SOLVED] How-to display full search results instead of Title and a little text. levd Page & Category Menu Bars 2 Oct 29, 2009 12:23 PM
Search for Wordpress and legacy part of site? paulae Atahualpa 3 Wordpress theme 1 Jul 3, 2009 08:58 PM


All times are GMT -6. The time now is 10:56 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.