unklee
Forum Replies Created
-
Forum: Plugins
In reply to: [Add Any Extension to Pages] HTML on pages only?Hi Marios, I really appreciate your help. Here is my summary.
There are a number of pieces of code out there that add the .html extension simply by changing the permalink structure, which of course only affects posts. I have found this one) which adds the extension to both posts (via permalinks) and pages (by adding code to the functions.php file), but if I don’t add to the permalinks then the pages extension doesn’t seem to work either. I would have used that if it worked the way I wanted, because adding specific code is generally more efficient than adding a plugin.
There are several other plugins out there, but they are all old and I didn’t find any that worked at all except yours. For example, this one was written less than 4 years ago, but several people have found it is now not working, and there is no response on the plugin support page.
So yours is clearly the best option for me at the moment. Unfortunately my understanding of WordPress and php are too basic to allow me to diagnose or fix the issue we are discussing. My thought is that the static home page and the blog home page are two very specific things in WP, and somehow the static page is exempt from adding the extension, so you would think there would be a way to exempt the blog home page too.
But it is a minor issue, and I can live with it, so I think I will go ahead and use it thanks (so far I have only installed it on a trial site). Thanks again.
Forum: Plugins
In reply to: [Subscribe to Comments] Not working/appearing at all after updateDitto me. All fine until recently, don’t know when or cause. I recently updated to Genesis Framework, and I have kept my WordPress up to date, and somewhere in that it disappeared.
Forum: Plugins
In reply to: [Add Any Extension to Pages] HTML on pages only?Hi again. Sorry for delay, I’m in Australia and I was sleeping!
No, if I remove the extension I get a “Not found error 404”.
Curiously, while the extension is added normally for all pages (i.e. sitename/page.shtml) for the blog page the trailing / is retained (sitename/blog.shtml/).
It would be nice to resolve this, but really, it works as it is, and I can fix incoming links with a redirect. So if you have a solution I’d appreciate it, but if you don’t, I wouldn’t want to take up your time, I really appreciate your plugin and your help so far.
Thanks.
Forum: Plugins
In reply to: [Add Any Extension to Pages] HTML on pages only?Yes, it is tricky, I appreciate you trying.
Yes, the blog home page is my last remaining issue. I’m not sure what you mean by category URL. If you mean a category archive, it comes out fine – sitename/blog/category/categoryname/. The pages and subpages are now fine. And the individual posts are fine too (no extension) because I’ve not added the extension to the permalinks.
I guess I can understand why the blog home page has a .shtml extension, for it is after all a page, not a post, so you might expect it to behave the same as other pages. But the site static home page is also a page and it doesn’t have the extension added. Is this a clue to the answer to my problem?
Thanks again.
Forum: Plugins
In reply to: [Add Any Extension to Pages] HTML on pages only?Hi Marios, thank you for being so helpful, I really appreciate it.
The subpages problem was mine, not your plugin. Some of the links didn’t update properly, but I have sorted that out now. I’m sorry to get that wrong. So, yes, it is now showing sitename/mainpage1/subpage1.shtml just as it should.
Blog was listed among the categories in the Posts, Categories section of the Dashboard, but I don’t know why. But I deleted it and it didn’t make any difference, then I reinstated it and still no difference. Why did you ask? Does this determine whether the extension appears or not?
Thanks you again for giving me your time. So far the problems have all been at my end, and I appreciate your patience, and apologise for my mistakes.
Forum: Plugins
In reply to: [Add Any Extension to Pages] HTML on pages only?Oops, just found another issue, I’m sorry.
I have a two level page structure, so some pages appear as sitename/mainpage1.shtml and then subpages appear as sitename/mainpage1/subpage1.shtml.
Your plugin is getting the mainpage1.shtml correct, and but the subpage comes out as sitename/mainpage1/subpage1/. Does it only work on top order pages? Again, is there some code I could add to do the second order pages?
Thanks again. Sorry to bother you.
Forum: Plugins
In reply to: [Add Any Extension to Pages] HTML on pages only?Hi Marlos, thanks for a quick response. I tried that before and it didn’t seem to work, but I just tried it again and it looks pretty good.
My only remaining question is: in my old setup, the blog home page (where the latest blog posts appear in abbreviated form) had the URL sitename/blog/ whereas now this too has the .shtml extension. Is there a way for me to amend the code to not have the extension here, or is this treated like any other page and cannot be changed? (In which case, I’ll just use a 301 redirect in my .htaccess file, but it would be nicer to have the blog home page treated like a post rather than a page if I could.)
Thanks heaps. Regardless, this plugin looks to solve my main problem, and I have tried several plugins and several code additions that haven’t worked for me.
Forum: Plugins
In reply to: [WP Page Extension] Not workingYeah, me too, I’m sorry to say. It says there is an error when I try to activate and won’t activate. I guess this plugin isn’t current now?
Forum: Fixing WordPress
In reply to: Combine .htaccess file for HTML and WordPressI’ve been looking at this a little more, and I’m sorry, but I realise I don’t understand what you are suggesting. Let me clarify a little more.
The WordPress-generated .htaccess file has the following:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Because for a while yet my site will be a hybrid WordPress/HTML site, I need some some 301 redirects for when HTML pages become WP pages and the URL changes, and a DirectoryIndex command to identify the change in home page from .shtml to .php. I also used to have the following .htaccess file, most of which I think I will still need for a while (although most things seem to be working OK without these extra commands):
Options +Includes AddType text/html .shtml AddHandler server-parsed .shtml RewriteEngine on RewriteCond %{HTTP_HOST} ^is-there-a-god.info [NC] RewriteRule ^(.*)$ https://www.is-there-a-god.info/$1 [L,R=301,NC] <Files .htaccess> order allow,deny deny from all </Files>
This seems to be more than you are allowing for here. Are you saying I should put all my commands in the place you indicate?
Thanks.
Forum: Fixing WordPress
In reply to: Combine .htaccess file for HTML and WordPressThanks, I’ll give it a try.
Forum: Plugins
In reply to: [Manual Related Posts] How to change default image size ?I don’t know if anyone will ever read this, but I have improved the code further (I think).
As written, the plugin code fixes the width of each related post graphic and link. That means, in a responsive design, with smaller screens, the strip of related post links becomes too long for the width and one of the graphics/links overflows onto the next line, which can be ugly. Normally you would deal with this through media screen code in the CSS, but since the width is hard-coded into the PHP, the CSS won’t over-ride it.
The solution is simple. Remove the width statement for “bawmrp li” from the plugin PHP (the size for the image can remain) and put it into the CSS. Make it (say) 25% (if you want four graphics/links across the page), and then change it to 50% when the screen size is smaller (making 2 lines across the page).
My suggestion to the plugin designer. This seems to be a well-written plugin that fulfils my requirements for a manual related posts rather than automatic, but why put the styles for “bawmrp li” into the PHP code at all? Why not take it all out and add an extra file which instructs the user ot add the CSS to their style.css file?
Thanks.
Forum: Plugins
In reply to: [Manual Related Posts] Want to chagne image size of related postI think I have solved this one, here: https://www.ads-software.com/support/topic/how-to-change-default-image-size?replies=3
Forum: Plugins
In reply to: [Manual Related Posts] How to change default image size ?I think I have solved this, for anyone willing to edit the plugin files.
If you go to the plugin in your dashboard and click on “Edit”, a PHP file will open and there are 10 files in a list to the right. Choose the file “baw-manual-related-posts/inc/frontend-noajax.inc.php” to open it up in the edit window.
Copy the entire file to a text editor and save it, just to make sure you can restore it if you stuff something up.
You need to edit two pieces of code, which change the default size of the image and change the width of the “li” which contains each related post.
1. About halfway down there is a filter for “bawmrp_li_style”, which includes “width=120px”. Change this to 150px, or whatever suits (I used 200px).
2. A little further down is another filter for “bawmrp_thumb_size”, which sets the default to “100,100”. Change this to the image size you want – 137,84 in your case (I used 150,75).
Click on the update file button and refresh your page and it should all come out the way you want (though I had to close my site down and open it up again to get the new values to “take”. Then style the elements as required.
It worked for me, hope it works for you.
Forum: Plugins
In reply to: [Manual Related Posts] Want to chagne image size of related postUnfortunately, when I add this to my functions.php file the website won’t show, so there must be something wrong with the code. Any ideas please?
Forum: Plugins
In reply to: [Manual Related Posts] How to change default image size ?Yes, I am interested in this too. Using “Inspect Element” in my browser I can see that wp-post-image is set at 100 x 100, but I can’t see where it is set this way. Is it hard coded in somewhere?