-
AuthorPosts
-
January 17, 2014 at 7:16 pm #834
I know there is a way to change the number of similar images. ( I did before) but I can’t find back how to do this. I either can’t find the topic here
After updating the sybiostock theme , this changed back to default I gues.
Joan or christine I think one of you told me the solutionJanuary 17, 2014 at 7:43 pm #8470It requires code. The original thread had information on how to change it to hardwire a different number and then as a follow on I posted a thread about a change I made to the widgets for latest images and similar images so you could specify the numbers there in the WordPress UI.
Here’s what 6 images in 3 columns looks like:
http://www.digitalbristles.com/image/sunrise-over-merrymeeting-lake/
If you’re up for changing a php file you can get the code from GitHub
https://github.com/joannsnover/symbiostock/commit/1f06bfaea5e55897dfc0afead26182912438ee40
The green lines in the display are the lines I added, red those that were deleted – you can grab the entire file or just cut and paste
January 17, 2014 at 10:59 pm #8471Maybe I’m asking too much but can you make this widget available as a plugin so the code alterations won’t get overwritten with every theme update?
January 17, 2014 at 11:28 pm #8472I think the simpler thing would be for Leo to take a look and if it’s OK with him, make it part of the theme in a future version – it’s a pretty minor alteration and I can’t imagine what it could break.
I could learn about writing plugins (it would be a good thing to do, but I don’t have time right now to do that) but no promises on when that could happen.
When there is an update, if the modified file has no other changes, then you just replace it – it only requires work if there are other changes to that file.
January 17, 2014 at 11:34 pm #8473You’re right. Having it done within the theme makes a lot more sense. I hope Leo reads this and considers this alteration.
Thanks for your work.
January 18, 2014 at 12:44 pm #8474Found this again. as long as there is no solid setting. For me the most easy way to adjust
You can find the code here:
wp-content/themes/symbiostock/inc/classes/widgets.php
You would need to change line 800 from:
‘posts_per_page’ => 12, // return 5 posts
to:
‘posts_per_page’ => 6, // return 5 posts
But please note that any updates that you make to the parent Symbiostock theme will overwrite this.
The best thing would be to put this in your child theme, but I don’t know how to do that for a class that is below the main theme directory (wp-content/themes/symbiostock). If you figure that one out, then please let me know.
January 22, 2014 at 10:46 pm #8475Great job. This is remarkable work 🙂
-
AuthorPosts
You must be logged in to reply to this topic.