Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #834
    Profile photo of hans slegers
    hans slegers
    Participant

    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 solution

    #8470
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    It 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

    #8471
    Profile photo of Andre
    Andre
    Participant

    Maybe 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?

    #8472
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    I 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.

    #8473
    Profile photo of Andre
    Andre
    Participant

    You’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.

    #8474
    Profile photo of hans slegers
    hans slegers
    Participant

    Found 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.

    #8475
    Profile photo of Leo
    Leo
    Participant

    Great job. This is remarkable work 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.