Forum Replies Created

Viewing 15 replies - 181 through 195 (of 380 total)
  • Thread Starter ejm

    (@llizard)

    Unfortunately, I have still been unable to test the above coding (I have full access to the WP as an admin but do not have full access to the files on the site so cannot see the lib folder to look at the function in \wp-content\themes\genesis\lib\structure

    However, I thought I would try to apply this with a different theme on my own test WordPress. I have Asteroid Child installed. The search form is on the parent Asteroid theme header.php

    Confirming that a little knowledge truly is a dangerous thing and not really knowing what I’m doing, after a lot of trial and error (errors galore), I have the following coding that doesn’t work but at least has stopped throwing any errors:

    function my_search_form() {
    $searchhome="echo home_url('/');";
    $searchonfocus="if (this.value == 'Search') {this.value = '';}";
    $searchonblur="if (this.value == '') {this.value = 'Search';}";
    
    if ( asteroid_option('ast_menu_search') == 1 ) {
    	$form = '<div id="nav-search">
    		<form id="nav-searchform" role="search" method="get" action="$searchhome">
    	<input id="nav-s" type="text" value="Search" onfocus="$searchonfocus" onblur="$searchonblur" name="s" />
    <span id="exact-phrase" title="toggle for exact phrase"><input type="checkbox" name="phrase" id="phrase" /><label for="phrase" >exact&nbsp;phrase</label></span>
    	<input id="nav-searchsubmit" type="submit" value="" />
    		</form>
    </div>
    	';
    }
    	return apply_filters( 'my_search_form', $form, $searchhome,
    $searchonfocus, $searchonblur );
    
    add_filter( 'ast_menu_search', 'my_search_form' );
    
    }

    I didn’t have
    add_filter( 'ast_menu_search', 'my_search_form' );
    initially and hoped that adding it, by a miracle, the functions.php coding would suddenly work. Alas no. (Big surprise.) The exact phrase checkbox refuses to show.

    This is the coding for the search form that appears on the parent Asteroid in header.php:

    <!-- Searchform -->
    		<?php if ( asteroid_option('ast_menu_search') == 1 ) : ?>
    			<div id="nav-search">
    				<form id="nav-searchform" role="search" method="get" action="<?php echo home_url( '/' ); ?>">
    					<input id="nav-s" type="text" value="Search" onfocus="if (this.value == 'Search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" name="s" />
    					<input id="nav-searchsubmit" type="submit" value="" />
    				</form>
    			</div>

    Do I have to make a mention of the header.php in the child functions? If so, how would I do that?

    Many thanks for any help.

    E Morris (WP 3.7.1)

    Thread Starter ejm

    (@llizard)

    Yes, Genesis is the parent theme.

    Thread Starter ejm

    (@llizard)

    Excuse me for replying to myself. I finally found it. On my theme’s search.php file, I had to look for the instances of

    <?php echo attribute_escape($s); ?>

    and change the surrounding quote marks for square brackets.

    It’s easy once you know what to look for….

    duhhh… please excuse me for replying to myself. I had neglected to activate relevanssi…. The checkbox is working just fine now.

    Many thanks for a great plugin!

    I like this idea a lot and have just installed relevanssi, as well as implementing the checkbox for exact phrase. Unfortunately, the box does not stay checked so I am unable to contrast and compare to see whether there are different results if the box is unchecked. Any ideas?

    E Morris

    etherwork.net/blog/ << purposely left unlinked in an attempt to keep spammers at bay

    Thread Starter ejm

    (@llizard)

    Oops! So sorry, I completely forgot to check back. Yes, that works perfectly well. Thank you.

    Thread Starter ejm

    (@llizard)

    I am happy to say that I have finally figured out what the problem was. For some reason, a commented out section on one of the approved comments caused the rest of the comments to disappear.

    I approved the comment because it was on-topic but hadn’t decided yet whether to allow the blatant advertisement at the end so simply commented it out:

    <!– span style=”color:#abc;” Visit h t t p : / / s o m e o n e – s – t o u r i s m w e b s i t e . c o m providing information about (a href=”http://someone-s-tourismwebsite.com/tourism.html&#8221; rel=”nofollow”>)Tourism(/a), (a href=”http://someone-s-tourismwebsite.com/&#8221; rel=”nofollow”)Business Directory(/a) –>

    I’ve done this before without anything exploding but for some reason, it didn’t work this time.

    Still, I’m really glad to have discovered that I don’t have to change my theme.

    edit: I just experimented and this commented out section DOES work:

    <!-- Visit h t t p : / / s o m e o n e - s - t o u r i s m w e b s i t e . c o m providing information about Tourism -->

    Thread Starter ejm

    (@llizard)

    Not entirely. The new images are not showing on Twenty Twelve.

    It’s looking like it might be a server problem. Before going through the nightmare of customizing Twenty Twelve, (ie: creating a childtheme) I’m going to wait until I hear from my webhost to find out if they can do something on their end.

    Many thanks for your time, Esmi.

    Thread Starter ejm

    (@llizard)

    It might be theme-specific. If I switch to twenty twelve, the missing comments show up. However, everything was working well (until yesterday) with my custom theme since February when I upgraded to 3.5.1

    I have a feeling that it might be an apparently inactive plugin.

    And NOW new images are refusing to show up in Twenty Twelve as well.

    I uploaded this today: etherwork.net/blog/?attachment_id=1721 It shows up in my admin area but not on the blog itself.

    I’ll try resetting the plugins folder. Fingers crossed that it will work.

    Thread Starter ejm

    (@llizard)

    After reading the comments at devilsworkshop.org/tips/repair-and-optimize-wordpress-database/43635/ I went directly into phpmyadmin and checked each of the tables listed. It said they were okay. So I went back to /wp-admin/maint/repair.php to see the following:

    The wp_users table is okay.
    The wp_usermeta table is okay.
    The wp_posts table is okay.
    The wp_comments table is okay.
    The wp_links table is okay.
    The wp_options table is okay.
    The wp_postmeta table is okay.
    The wp_terms table is okay.
    The wp_term_taxonomy table is okay.
    The wp_term_relationships table is okay.
    The wp_commentmeta table is okay.

    Alas, the comments are still not showing up.

    Thread Starter ejm

    (@llizard)

    Aha. It appears that I do need to repair my database. I backed it up and then went to /wp-admin/maint/repair.php and followed the instructions to add define('WP_ALLOW_REPAIR', true); to my config file. I reloaded the page and received the following message:

    wp_usermeta: 1 client is using or hasn’t closed the table properly
    wp_posts: 2 clients are using or haven’t closed the table properly
    wp_comments: 4 clients are using or haven’t closed the table properly
    wp_options: 4 clients are using or haven’t closed the table properly
    wp_postmeta: 2 clients are using or haven’t closed the table properly
    wp_commentmeta: 4 clients are using or haven’t closed the table properly

    Please advise.

    Thread Starter ejm

    (@llizard)

    This is the rather sloppy coding that I have on my comments.php to list the comments:

    <?php if ( have_comments() ) : ?>
    <ol id="commentlist">
    <?php foreach ($comments as $comment) : ?>
    <li id="comment-<?php comment_ID() ?>"<?php if ($comment->comment_author == "ejm") echo ' class="ejm"'; elseif ($comment->comment_author_email == "ejm-id"."@"."domainname.com") echo ' class="ejm"'; elseif ($comment->comment_author_email == "tph-id"."@"."domainname.com") echo ' class="tph"'; elseif (($comment->comment_type == "pingback") ||($comment->comment_type == "trackback"))  echo ' class="pingback"'; else echo ''; ?>>
    <small><cite><?php comment_type(_x('Comment', 'noun'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?>  — <?php comment_date('j F  Y') ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite> <?php edit_comment_link(__("edit"), ' |'); ?></small>
    	<?php echo get_avatar( $comment, 16 ); ?>
    	<?php comment_text() ?>
    	</li>
    <?php endforeach; ?>
    </ol>
    <?php else : // If there are no comments yet ?>
    <!--	<p><?php _e('No comments yet.'); ?></p> -->
    <?php endif; ?>

    I have no idea how to fill in the array for $args to reflect the above.

    http://codex.wordpress.org/Function_Reference/wp_list_comments

    Thread Starter ejm

    (@llizard)

    You’re correct, Esmi. My comments.php file isn’t using wp_list_comments() I have been running the wordpress 3.5.1 for some time now without any glitches.

    The comments have been showing up perfectly well without wp_list_comments() since yesterday at 2013/06/03 at 09:57 EDT.

    The comment from Barbara that is refusing to show up was submitted 2013/06/03 at 22:00 EDT

    What else might have happened in those 12 hours that would have caused this?

    Thread Starter ejm

    (@llizard)

    I kept ferreting around on google and found the following coding:

    AllowOverride All

    I added it to the wp .htaccess file and believe that I have found the answer to the question of whether my sister’s has mod_rewrite on her server: no. It caused an Internal server error.

    I will email her and ask if mod_rewrite can be activated for wp.

    Thread Starter ejm

    (@llizard)

    Thank you, Esmi. This is not my host but my sister’s. She is on the west coast and it is still insanely early on a holiday Monday so I cannot ask her.

    What exactly is the mod_rewrite coding that should be in the .htaccess file for the wp folder? (Has wp stopped including .htaccess files in the download packages?)

Viewing 15 replies - 181 through 195 (of 380 total)