• Resolved noratom

    (@noratom)


    Hi there, nice plugin!

    Is there a way to change the box size? It’s very large and I would also love rounded borders.

    I would also love to add the actual words “next post/previous post” in the box (in my own language).

    The excerpt is taken from the page content which in my case means it shows “category”, the title of the image, etc. Instead I would like to use the WP excerpt. Is that possible?

Viewing 15 replies - 1 through 15 (of 33 total)
  • Plugin Author Jo4nny8

    (@jo4nny8)

    Hi

    Thanks for the feedback. Im currently going through a major update to allow some of the requests people have made, however COVID-19 has put a slight spanner in the works and its likely a little while before I get it finished.

    In the meantime please try the following:

    Regarding the box sizes, this can be done with some custom css.

    /*Change #post-nav-previous-switched to #post-nav-previous for normal use, and also #post-nav-next for the opposite side*/
    .wp-post-nav #post-nav-previous-switched {
    height: /*change this rule to suit height requirements*/;
    border-radius: 35px 0 0 35px; /*this rule adds rounded borders*/
    }

    Regarding the words next post / previous post -> This is a requested feature and will be added in the next update as an option.

    Changing where the excerpt comes from, the function only takes the wordpress content which is part of the post object received from WordPress. I can add a hook in this version to modify that, but for now you can change the class_wp_post_nav_public file and modify lines 334 – 339.

    Comment all those lines out and add the following:

    $excerpt = get_the_excerpt($id);

    This will still use the built in function, but override the code to simply fetch the default excerpt from wordpress.

    Hope that helps.

    Thread Starter noratom

    (@noratom)

    Hi @jo4nny8,

    thank you very much!
    I am a complete digital moron, that’s why I use plugins ??

    Do I need to copy everything you wrote out in css?

    The part about the excerpt I don’t understand. Would it be possible for you to explain it in other words, or do you think it’s better to leave this if I don’t have any experience with overriding code?

    Plugin Author Jo4nny8

    (@jo4nny8)

    Can you send me a link to your site so I can take a look to offer the best advice for the css.

    regarding the change to getting the excerpt. I can email you a modified version of the plugin if you provide me an email address.

    Thread Starter noratom

    (@noratom)

    Hi @jo4nny8,

    Thank you so much!
    Excellent support ??

    my site is still under construction. Would screenshots be ok?
    If not, I’ll figure something out. Probably tomorrow though, because I am not @ home now with the PC.

    My e-mailaddress is [email protected].

    Regards

    Plugin Author Jo4nny8

    (@jo4nny8)

    Ive just sent you a modified version of the plugin which should work. It will come as a wetransfer request.

    Let me know if it works for the excerpt

    John

    Thread Starter noratom

    (@noratom)

    Hi @jo4nny8,

    wow, thanks!!
    I see the transfer, will upload it as soon as I can and will get back to you, promised!

    Do you want a link to my site or are screenshots ok?

    Plugin Author Jo4nny8

    (@jo4nny8)

    Screenshots should suffice so I can see how you’ve got it setup.

    Make sure you get a mobile screenshot too

    Thread Starter noratom

    (@noratom)

    Hi @jo4nny8,

    THAT’S PERFECT!
    Thank you so much!

    Here are some screenshots, hope it’s ok. Please let me know if you can work with this. The arrow background color is probably not what I’ll stick with. Grey/green with pink looks weird. But at least you have an impression now.
    I would like smaller text/image/excepts boxes.

    [IMG]https://www.mupload.nl/img/85s7p5e6gv.jpg[/IMG]
    [IMG]https://www.mupload.nl/img/4ei1yja.jpg[/IMG]
    [IMG]https://www.mupload.nl/img/56n3vu7.jpg[/IMG]

    Thanks again for the zip!

    regards

    Thread Starter noratom

    (@noratom)

    Hi @jo4nny8,

    how’s the major update going?
    Do you have an idea of when it’s probably going to be available? Can’t wait!

    Kind regards

    Plugin Author Jo4nny8

    (@jo4nny8)

    Apologies for the delayed reply.

    Ive just sent you the latest version. Its 99% complete bar the changelog and some help classes / instructions.

    If you unzip this, then upload it to your site, it should regonosise the old format and transfer everything over for you (ive changed the way the plugin registers options)

    PLEASE, back your site up first.

    You’ll need to add some code to your function file to overwrite the built in way the excerpt is taken. inside the plugin folder you’ll see an examples.txt file. You need the hook below

    add_filter(‘wp-post-nav-excerpt’, ‘__return_false’);

    put that in your theme function file to make the customisations work I gave you last time

    Thread Starter noratom

    (@noratom)

    Hi @jo4nny8,

    thank you so much!
    Please don’t apologize. Onve I’m off work, I will implement it and wll let you know hoe it works.

    Thanks again.

    Thread Starter noratom

    (@noratom)

    hi @jo4nny8,

    seems to work fine!
    Now I am going to try to alter the Next / Previous Heading.

    Is there a way to change the word Category? I would like to change the language. Or is this a part of the update you are working on?

    Well, many thanks, I am very happy!

    Regards

    Plugin Author Jo4nny8

    (@jo4nny8)

    Yep, already added that feature.

    /*Alter the Next / Previous Heading. Default wording is the post type, simply return something else*/
    add_filter(‘wp-post-nav-heading’, ‘example_heading’);

    function example_heading($heading) {
    $heading = ‘Article’;/*change this to whatever you like*/
    return $heading;
    }

    Thread Starter noratom

    (@noratom)

    great!!!

    Thanks, thanks!

    Thread Starter noratom

    (@noratom)

    Hi @jo4nny8,

    I tried to change the box size and border radius in custom css/js with:

    .wp-post-nav #post-nav-previous-switched {
    height: 40px;
    border-radius: 35px 0 0 35px;
    }

    but it didn’t work. Must be doing something wrong ??
    Could you help me?

    Thanks!!

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘how to change box’ is closed to new replies.