ejm
Forum Replies Created
-
Thank you. I see that in the initial configuring of iThemes security (I had to move fast – my site was undergoing a brute force attack at the time), the permissions were changed to disallow me from changing the file.
I’ll go into CPanel and change the permission temporarily to put in the necessary coding and then change it back to what it was.
Forum: Fixing WordPress
In reply to: account suspended because of brute force attacksMany thanks for your help.
I’m happy to say that my site is back online (so far). I’ve installed iThemes Security plugin. Fingers crossed that all these new precautions will do the trick.
Forum: Fixing WordPress
In reply to: account suspended because of brute force attacksThank you.
If it’s that widespread of an attack, someone (or a group) doesn’t like you. Simple as that.
Wow. I wonder what on earth I’ve done or said to make people dislike me so intensely. (My site is essentially a recipe site….)
Read […] http://codex.wordpress.org/Brute_Force_Attacks#Limit_Access_to_wp-admin_by_IP
How do I know if my theme or plugins use AJAX? Is this listed somewhere?
Excuse me for needing to have this spelled out, does that .htaccess file denying wp-admin access to anyone but someone from my ISP go into the WP-admin folder?
Forum: Fixing WordPress
In reply to: account suspended because of brute force attacksThank you for your reply.
I do realize that this is not WordPress specific. But it does seem that anything with a database is vulnerable.
To answer your first question: it is not the entire webhost; it is just my site. Various pages are being hit. I have two WPs both in separate folders, so the login page for one of the WPs is being targetted, as well as that WP’s xmlrpc.php, as well as the index page for the site and for two other folders. Various pages of the other WP are being slammed as well.
Most (as far as I can tell) of the errant ISPs are from China. But there are some from USA, Russia, Germany, Ukraine, Czech Republic, Slovenia, and the Phillipines.
I get the impression that the webhost will help BUT I need to know what I can do (if I ever get back in again) to help prevent this from happening again.
Forum: Fixing WordPress
In reply to: account suspended because of brute force attacksExcuse me for replying to myself… I have also stared at http://codex.wordpress.org/Hardening_WordPress
Forum: Themes and Templates
In reply to: [Asteroid] how to customize search results in Asteroid ChildI really am most appreciative for all the help, ronangelo. But after all that you have done, I have decided to go with adding a search.php in the child folder:
<?php /* Template Name: Search Page */ get_header(); ?> <div id="content"> <p><strong>WordPress found <?php echo $wp_query->found_posts; ?> search results for [<?php echo attribute_escape($s); ?>].</strong></p> <ul class="search-results-list"> <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?> <li><h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> (<?php the_date(); ?>)</h3> <?php the_excerpt(); ?></li> <?php endforeach; else: ?> </ul> <p><?php _e('Please try again using different search term(s).'); ?></p> <?php get_search_form(); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>The other function fixes have been most informative though. Thank you again.
Forum: Themes and Templates
In reply to: [Asteroid] how to customize search results in Asteroid ChildThank you once more, ronangelo.
Forum: Themes and Templates
In reply to: [Asteroid] how to customize search results in Asteroid ChildThank you, once again, ronangelo. This display_search_terms() is most helpful.
But I’m not sure that using “display:none” for not showing the content is the way to go here. I worry that it might flag the site as an undesirable for the big search engines. (I get the impression they aren’t too keen on “display:none” when there is content there to be seen if the styles are disabled.)
I know the following must be wrong wrong wrong. But this is as far as I can guess from staring at http://codex.wordpress.org/Class_Reference/WP_Query
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if ( $wp_query->found_posts == !is_singular() ) : ?> <ul> <?php if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); echo '<li>' . get_the_title() . '</li>'; } ?> </ul> <?php } else { // no posts found }?>Forum: Themes and Templates
In reply to: [Asteroid] how to customize search results in Asteroid ChildThe translate/change words coding works wonderfully. Thank you again.
My struggle continues: how can I add the following to the top of the search results page? Must I create a search.php?
<?php $wp_query->found_posts .'results for [' . get_search_query() .']'Also, I have been unable to find where the coding is in the Asteroid files that produces the search result. I was hoping to show search results with title and the date only. Something along this line:
<ul> <?php if [SOMETHING GOES HERE BUT WHAT??] : foreach [SOMETHING GOES HERE TOO BUT WHAT???]; ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> (<?php the_date(); ?>)</li> <?php endforeach; else: ?> <li><?php _e('Alas, nothing matched your criteria; please use the search form at the top of the page'); ?></li> <?php endif; ?> </ul>I finally found that .blog-view is how the results are styled.
Forum: Themes and Templates
In reply to: [Asteroid] how to customize search results in Asteroid ChildFantastic! I’ll give that a shot. Many thanks, ronangelo!
Forum: Themes and Templates
In reply to: [Asteroid] how to customize search results in Asteroid ChildThank you for your reply, ronangelo.
What do you mean by “customize”? Modifying the results or the appearance? In what way?
I would like to modify the words in the heading of the wrap-404-box “Search Results: Nothing Found” AND the words in the <p> “Try a new keyword. I’m guessing by the presence of “asteroid” in that there might be a function I can use. I just don’t quite know where to look for that function.
<?php _e('Search Results: Nothing Found', 'asteroid'); ?>Again, I’m very much hoping not to have to create a search.php for the Asteroid Child but to make the change in the theme’s functions.php
edit: I tried adding the following to functions.php, but of course, even though it doesn’t throw any errors, it didn’t work.
if ( is_search() ) { // add external search form (Google, Yahoo, Bing...) echo $wp_query->found_posts .' search results for [' . attribute_escape($s) .']'; }Many many thanks, ronangelo! That works beautifully.
It is a child theme, and as far as I can tell, it is not available on WP. http://ronangelo.com/child-theme-for-asteroid/
Aside from that, I’m thinking that the answers here may apply to other themes as well.
Excuse me for replying to myself.
Following http://codex.wordpress.org/Function_Reference/get_search_form I realized that even though I cannot manage to change the search box in the header, I CAN use the theme’s functions.php to add the search form to the sidebar of Asteroid Child. The following coding works:
function my_search_form( $form ) { $form = '<form role="search" method="get" id="searchform" class="searchform" action="' . home_url( '/' ) . '" > <div><span id="exact-phrase" title="toggle for exact phrase"><input type="checkbox" name="phrase" id="phrase" /><label for="phrase">toggle for exact phrase</label></span><br /> <label class="screen-reader-text" for="s">' . __( 'Search for:' ) . '</label> <input type="text" value="' . get_search_query() . '" name="s" id="s" /> <input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search' ) .'" /> </div> </form>'; return $form; } add_filter( 'get_search_form', 'my_search_form' );But I would like to add a dropdown list to allow restricted searches of specific categories. I got this far but this adds two dropdown menus: one above the search form and the other inside the search form. What am I doing wrong?
function my_search_form( $form ) { $dropdownmenu = wp_dropdown_categories(array('show_option_all' => 'all categories', 'exclude' => '3')); // where category 3 is the administration category $form = '<form role="search" method="get" id="searchform" class="searchform" action="' . home_url( '/' ) . '" > <div><span id="exact-phrase" title="toggle for exact phrase"><input type="checkbox" name="phrase" id="phrase" /><label for="phrase">toggle for exact phrase</label></span>'.$dropdownmenu.'<br /><label class="screen-reader-text" for="s">' . __( 'Search for:' ) . '</label> <input type="text" value="' . get_search_query() . '" name="s" id="s" /> <input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search' ) .'" /> </div> </form>'; return $form; } add_filter( 'get_search_form', 'my_search_form' );Many thanks for any help you can offer.
Rats! I was hoping not to have to create a custom header.php. Can it not be done with functions.php? Or might it be possible to do it with a customized plugin?
This way if the parent header.php is updated then the child header will be updated too.