ejm
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Site url redirects to wp-admin/install.phpWell, THAT was a nightmare. I tried repairing the database. Nope. I deleted and re-uploaded all the files. Nope. I deleted the config file and uploaded it again. Nope. I restored the database to an earlier version. Nope.
Finally, in a last ditch effort, I removed “install.php” entirely. And hey presto, I could access the admin folder again, where there was a message to upgrade the database. This was done and finally (after MORE THAN AN HOUR of fooling around with files) I could access the admin area.
So if reinstalling ALL the files and repairing your database doesn’t work, then you might like to try the above.
- This reply was modified 9 years, 3 months ago by ejm.
Of course, after regaining access to my admin area, I renamed the plugin folder to its correct name….
Excuse me for replying to myself.
I found the following at https://wordpress.org/support/topic/cannot-log-in-to-wp-admin-4/page/3
Ok, I found the issue with my installation, for those who are redirected to a secure https:// yoururl white 404 message – this is what I found and did.
1.) Using Cpanel File manager : Renamed the plugin folder
2.) checked .htaccess for any security code (I found none)
2.) checked wp-config.php and here I did find the following code at the top of the page:define( ‘FORCE_SSL_LOGIN’, true );
define( ‘FORCE_SSL_ADMIN’, true );
define( ‘DISALLOW_FILE_EDIT’, true );I removed these three lines of code, saved the file and I then had my standard WordPress login screen back.
Unlike the above user, I have not removed iThemesSecurity (yet). If I encounter this problem again though, I will switch to using wordfence.
Forum: Plugins
In reply to: [Vi Random Post Widget] add date to go after titleThank you for your reply.
The only problem I foresee with these solutions is that my fixes will be erased if/when the plugin has to be updated.
How do I go about putting these changes into my theme’s function file?
This following is my best guess at the coding for my theme’s function file, but it is no doubt wrong.
/*............... virp date stamp ...............*/ add_filter('virp_get_default_args', 'virp_change_datestamp'); function virp_change_datestamp() { 'format' => 'j F Y', } return $virp_change_datestamp; } add_filter('args', 'virp_fix_args'); function virp_fix_args('date') { $date = $virp_fix_args['format']; $html .= '<span class="virp-meta"><i class="fa fa-calendar"></i> ' . esc_html( get_the_date( $date ) ) . '</span>'; return $virp_fix_args; }I’m a little reluctant to be risk breaking my wordpress by inserting poor function file coding.
Please advise. Thank you.
Forum: Plugins
In reply to: [Vi Random Post Widget] add date to go after titleThank you for your reply.
Unfortunately that didn’t quite work – all that happened was that the calendar character before the date disappeared and the date was still on the next line instead of being inline. But your answer did point me in the direction of a solution that comes closer to my goal. Here is what I have put into my theme’s CSS to get the date to be inline with the post title to produce title of random post , date:
.virp-clear {clear:none; display:inline !important;} .virp-meta {display:inline;} #virp-widget-2 .fa-calendar:before{content:",";}However, I don’t see how to remove the space that appears after the title and before the comma that is now there. Is there a way to insert the comma after the title? ie: which “.fa-” is the one that controls the title?
And finally, is there a way to display the date as “j F Y”?
Forum: Plugins
In reply to: [Vi Random Post Widget] add date to go after titleThank you for your response, Team Vivacity.
Because I only know enough about php coding to put myself in hot water, I am using a child theme of TwentyTwelve and would rather not introduce any more files than necessary. Hence, I do not have a footer.php file.
Also, I’m not sure I’m wild about the idea of using javascript to make this cosmetic change. (What happens if javascript is disabled?) Is there a way to change my css file only?
jQuery("#virp-widget-2 .fa-calendar").css("display","none"); // Replace #virp-widget-2 id with your id widgetWhere do I find my id widget?
E Morris, now updated to 4.4.2, etherwork [dot] net [slash] blog « purposely unlinked in attempt to keep spammers at bay
Forum: Fixing WordPress
In reply to: how to insert code using widgets OR child function fileThank you for your reply, stephencottontail.
I am trying to avoid adding too many extra files to my child theme so have not added the sidebar.php at all.
My grasp of PHP (in terms of security) is on the shaky side so I’m a little nervous to add the built-in text widget that allows PHP coding.
I had no idea that there was such an option as a special text widget. Armed with new search terms, I’ll do a little more investigation.
edit a few moments later:
Yes, as I thought, enabling PHP coding in widgets (via the child functions file) might not be the best way for me to go:
Use PHP in widgets very judiciously as this is a potential security vulnerability you open by enabling code execution from a widget, versus a file on the server. -http://www.carriedils.com/extend-wordpress-widgets-without-plugin/
Forum: Fixing WordPress
In reply to: incorrect link on image on media attachment pagesOnce again, please accept my apologies for replying to myself.
I discovered that I wanted to make a number of changes to image.php in my child theme (remove comment form, remove anchor link on image, add a link to the parent URL) So while it would be useful to know how to make a minor change via the child theme’s function file, in this case, it seems better to simply create an image.php for the child theme’s folder.
Many thanks to Esmi for outlining how to add the link to the parent URL. The instructions are here:
https://wordpress.org/support/topic/linking-gallery-images-to-parent-post-and-not-the-imagegallery?replies=3#post-1128264Forum: Fixing WordPress
In reply to: incorrect link on image on media attachment pagesPlease excuse me for replying to myself…
I had hoped this was the answer, but alas, it is not. It’s useful but it only changes the defaults when adding media to a new post.
https://wordpress.org/support/topic/insert-media-attachment-display-settings-set-a-default?replies=5#post-3902487Sadly, it is not for globally changing existing media pages….
It looks like I may have to create a special image.php. Because I’m always worried that my poor coding skills (ie: practically non-existent) will wreak havoc, does anyone know how I can make the
make the change to image.php within my child theme functions file?Over the course of the last few months, I have struggled with finding exactly where some of these errors are and have blundered onto them. It turns out that many were from my misunderstanding of
cite=on blockquotes in my early posts (I didn’t always know that cite was for URLs rather than the name of the author or book being cited…).However, I’m still seeing a number of 404s that don’t make any sense. They are coming from plugins that have been deleted. This is an example of one of them:
../wp-content/plugins/event-calendar/ec_load.gif
As far as I know I have removed all instances of anything to do with the event-calendar.
Other removed plugins also seem to be generating 404s.
Any ideas?
-E Morris – since first posting this question, I have upgraded WP to 4.3.1 and of course, iThemes Security plugin is also at the most recent level
Forum: Fixing WordPress
In reply to: How to change readmore>> to image button in mh magazine theme liteI’m not at all positive that this will work, but I can’t see why it wouldn’t.
First, if you haven’t done so already, create an MH Magazine lite child theme.
To create your child, your css file must start with something like this. The “template” part is essential.
/* Theme Name: your child theme name Theme URI: your website Description: child theme of MH Magazine lite Author: you and/or MH Themes Author URI: optional website address Version: 1.0.0 Template: MH Magazine lite */Note that the name beside “Template” must be exact. If you activate your child theme, you’ll see a note that the parent is MH Magazine lite. Save this as style.css and put it into your child theme’s folder.
Next, create a functions.php file (open a text editor like notepad) and copy and paste the following into it:
<?php /*............... replace import of parent's style on style.css ...............*/ add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') ); } ?>It is essential that there are zero spaces or line breaks before the first
<?phpand the last?>.Save the file as functions.php and put it in your theme’s folder.
Most cosmetic changes can be made in the css…. Consult the parent css file to find the ids and classes. You only have to change the ids or classes that you want changed (ie: you don’t have to include the whole of the parent css file)
Now, for the readmore change from text to image button, copy and paste the following into your child’s functions file one line above the final
?>:/*............... change read-more text to image button ...............*/ add_filter( 'the_content_more_link', 'modify_read_more_link' ); function modify_read_more_link() { return '<a class="more-link" href="' . get_permalink() . '"><img src="yourReadMoreimage.jpg" title="read more" alt="read more" /></a>'; }I hope that makes sense!
For more information about this, please take a look here:
https://codex.wordpress.org/Child_Themes
https://codex.wordpress.org/Customizing_the_Read_MoreForum: Fixing WordPress
In reply to: 404 page not foundI’m not quite sure what has happened but is it possible that your wp-config.php has not been created with your install? Or is it possible that your wp-config.php doesn’t have your details in it?
Try the following: take a copy of wp-config-sample.php and open it in a text editor (notepad). Save it as wp-config.php. Now look for the following:
/** The name of the database for WordPress */ define('DB_NAME', 'put_your_database_name_here'); /** MySQL database username */ define('DB_USER', 'put_your_username_here'); /** MySQL database password */ define('DB_PASSWORD', 'put_yourdatabasepassword_here'); /** MySQL hostname */ define('DB_HOST', 'localhost');You will have to change each of the parts that start with “put_your”. Definitely, use “copy and paste” when creating your wp-config file. The database host (along with the other database names you need) is listed under “databases” in your account.
Please remember that passwords and names ARE case sensitive.
Once you have made the changes, save your newly created “wp-config.php” and place it in your wordpress folder in the same spot as “wp-config-sample.php”.
If you have uploaded wordpress to a folder called “wordpress”, go to
your-sitename.com/wordpress/
and wordpress will begin the installation.
If that doesn’t work, try removing everything and re-installing entirely. Sometimes files get corrupted in the install.
For more information please re-read the following: http://codex.wordpress.org/Installing_WordPress
Forum: Fixing WordPress
In reply to: white screen after upgrading to 4.3Again, please excuse me for replying to myself. After reading the following at https://wordpress.org/support/topic/please-help-blank-page-when-accessing-my-site?replies=28#post-1651496
define these two variables in your wp-config.php file at top
define( 'WP_DEBUG', true );define( 'WP_DEBUG_DISPLAY', true );and check on site if you get any error message on site.
I was finally able to see an error message, telling me that there was something awry with functions.php in the wp-includes folder. It turned out that I had somehow re-installed 4.3’s functions.php. So I completely removed wp-includes (again) and replaced it.
I have now successfully reverted back one step to 4.2.4 and will wait for 4.3.1 (which will no doubt appear momentarily) before upgrading again.
Forum: Fixing WordPress
In reply to: white screen after upgrading to 4.3Excuse me for replying to myself….
I have just attempted to roll back to 4.2.3. I uploaded my backed up files and followed the instructions at https://codex.wordpress.org/Restoring_Your_Database_From_Backup to revert to the previous database. Apparently, this was successful. (That’s what the message in phpmyadmin said, anyway)
Alas, I’m still seeing a blank page for the admin area. I cannot tell if I’m logged in our out. But I’m assuming that I’m logged out. I’ve tried to access the admin area in both Firefox and Chrome.
I’m still panicking, even though I’ve been told not to.
wordpress.org/download/ wrote:
Should you run into any trouble along the way, our support forums are a great resource, where seasoned WordPress experts volunteer their time to help you
Could someone take pity and give me a hint about how to fix this?
(Remind me NEVER to do a WP upgrade again on a holiday long weekend.)
Forum: Fixing WordPress
In reply to: white screen after upgrading to 4.3Thank you for your reply, Aniket Ashtikar.
Aniket Ashtikar wrote:
Just wondering if you could just edit wp-config.php, change WP_DEBUG to true and let us know what notices do you receive!
I already have WP_DEBUG set to true because of problems on a previous upgrade in June 2013.
There are no notices, as far as I can tell, there is just a blank screen. Where would I see the messages?