ejm
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: frustrations with child functions fileyou need to look into the (php) source code of whatever template file or function you are trying to change
What I’m trying to do, Alcymyth, is add title specs to previous_post_link() and next_post_link(). I have gotten as far as seeing that these are housed in wp-includes/link-template.php and am guessing that I have to change $string somehow.
This is my guess at what is necessary to change the string:
$string = '<a href="' . get_permalink( $post ) . '" title=".$title.' rel="'.$rel.'">';Staring more at link-template.php, I see
/** This filter is documented in wp-includes/post-template.php */Does this mean that I want to use function or filter in my child functions file? AND ft’s function, which function(s)?Thank you for any help you can offer.
Forum: Fixing WordPress
In reply to: frustrations with child functions fileIt would be great if it actually ran at a reasonable pace. I didn’t mind (very much) reviewing the absolute “hello world” basics but as soon as it got into a section that is relatively new to me (loops), the page either crashed or refused to load the example – and I don’t think it was because of the answers I was giving.
I tried again this morning and it’s just as slow. Too bad.
Forum: Fixing WordPress
In reply to: frustrations with child functions fileThank you for the link, questas_admin. I hope that it will cover filters, functions, actions and/or hooks.
Also, thank you alcymyth. I will stare more at the twentytwelve files.
Forum: Fixing WordPress
In reply to: Change image size on hoverThat’s great, Nicky. I’m really glad it works for you.
(Don’t forget to say this topic has been resolved. 🙂 )
Forum: Fixing WordPress
In reply to: frustrations with child functions fileThank you, alchymyth.
I have seen a number of references to “action hooks” but have yet to find a dummy’s style tutorial so I (a non-programmer) can grasp how to use them. What search terms should I be trying?
Specifically, I’d like to learn how to get a filter and/or function to appear after (or before) something that is there.
Forum: Fixing WordPress
In reply to: Change image size on hoverThat’s too bad! Try this:
<p class="effectback"> <img class="effectfront aligncenter" alt="brief description of image" src="/wp-content/uploads/2015/07/500-1.jpg" /> </p>I hope that works!
edit: note that this coding is to replace the coding that you had. There is no need for any javascripting with this.
Forum: Fixing WordPress
In reply to: Change image size on hoverYou can achieve it with css and bypass javascript completely.
This would go in your css file:
.effectback { display: block; background: url('/wp-content/uploads/2015/07/logo_egatex_150.jpg') no-repeat; margin: 0 auto; } .effectfront { opacity: 0; border: none; margin: 0 auto; } .effectfront:hover { opacity: 1; transition: all 0.3s; -webkit-transition: all 0.3s; }And this would go in the main body area of the coding:
<div class="effectback"> <img class="effectfront" src="/wp-content/uploads/2015/07/500-1.jpg" /> </div>source:
http://stackoverflow.com/questions/18456169/show-enlarged-picture-when-mouse-hover-over-an-imageForum: Fixing WordPress
In reply to: frustrations with child functions fileIt’s the filters part and how to implement them that I’m trying to understand and having difficulty grasping. I don’t know enough about it to know what search words to use to find the answer. (When I do search, I invariably find my own unanswered questions….)
Specifically, I’d like to learn more about how to insert some text before or after a specific place in one of the twentytwelve files. Can you recommend an online tutorial that addresses creating filters?
Forum: Fixing WordPress
In reply to: How to Make a SideBarSeveral of the WordPress themes have sidebars on them. If you want left and right sidebars, look for a three column theme. You can adjust the width in the css file.
Forum: Fixing WordPress
In reply to: frustrations with child functions fileThere’s no need to copy/modify any files that are OK in the parent.
Yes, Steven, that I do understand. However, let’s say that I copy 2012’s content.php for my child theme. That means that every time 2012 is updated, I have to re-copy content.php and make the changes again, does it not? If the changes are housed in the functions file, then there will be no need to make any re-modifications.
Forum: Fixing WordPress
In reply to: frustrations with child functions fileThank you for your responses.
Steven, for the most part, my child theme of 2012 is working. There are just a few customizations that I am trying to understand how to make. Any forum questions along the same lines invariably recommend downloading and copying the parent file and changing it, rather than making the change in the functions file.
I were to ask you, why haven’t you been answering people’s threads?
Andrew, this is a fair enough question. My answer is that it would be a little like the blind leading the blind. However, I will attempt to answer the questions for which I do know the answers.
I’d go back to encouraging people to do the @import rule in the style.css file.
Alas, this does not address changes in text or addition of missing title specs to anchor links. If I ever do learn how to do this, I’ll attempt to add something to the codex – even though my grasp of coding is hardly in the league of most of the people who are editing those files.
E Morris
Please excuse me for replying to myself. I have come up with a rather inelegant solution on my own and am really hoping that there are no other instances of “Nothing Found” on the site that will be changed.
I removed the search box from the sidebar and replaced it with a link to mywordpress/?s. And this is what I added to the child’s functions.php (thanks to ronangelo for writing a page on gettext in layman’s terms – I tried to understand the WPcodex, I really did….)
/*............... search results page ...............*/ // thanks to http://ronangelo.com/change-or-translate-text-on-a-wordpress-theme/ function mychanged_text( $change_text ) { if ( $change_text == 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.' ) { $change_text = 'If there are no results with your search, please check your spelling and try again.'; } return $change_text; } add_filter( 'gettext', 'mychanged_text', 20 ); function mychanged_text2( $change_text2 ) { if ( $change_text2 == 'Nothing Found' ) { $change_text2 = 'Search Me'; } return $changed_text2; } add_filter( 'gettext', 'mychanged_text2', 20 );It’s with reluctance that I am marking this “resolved” because it doesn’t really answer my initial question. I still have no idea what the “20” signifies, nor do I know what search terms to use to find this out. (Also, there MUST be a way to alter only the search results page using the child’s functions.php)
Forum: Fixing WordPress
In reply to: how to add new widget to dynamic sidebarThank you, Alchymyth. I would consider it, but that plugin is only “Compatible up to: 4.0.5” and last updated 2014-10-7, which in computer terms is arguably eons ago.
I have had so many problems with blank screens that I don’t dare to install anything that is not current.
Forum: Fixing WordPress
In reply to: how to change author on page?Oops! Sorry about that. I was positive I had changed this to “resolved”. Thanks for the reminder, Jose.
Forum: Fixing WordPress
In reply to: how to change author on page?It looks like it was caused by the “coming soon / maintenance mode” plugin we had enabled. The problem is fixed now.
Thank you again for your responses.