Forum Replies Created

Viewing 15 replies - 31 through 45 (of 192 total)
  • Thread Starter SaladGoat

    (@saladgoat)

    The first part was light years beyond my comprehension.

    Thank you for coming back and adding the filter. It works perfectly!

    Thank you so much!

    Thread Starter SaladGoat

    (@saladgoat)

    Hi @noisysocks – no that doesn’t work, but it opened a pathway in my brain to show me what I was missing. Changing the || to &&! in the first block did the trick. I hadn’t been looking at the first block at all (when editing the code) and it turned out that the second sidebar was rendering below the first one. They are both very long and I wasn’t scrolling down far enough to realize my mistake.

    Thanks for helping!

    Thread Starter SaladGoat

    (@saladgoat)

    It seems as if every time I create a child theme, the rules are different. I don’t know what I am doing, so I always go to that Child Theme page on WordPress to follow the steps. And every time, it’s different. The code I posted is what they had when I made the site, maybe five years ago. Before that it was something like @import in the child theme’s stylesheet to import the parent stylesheet. And now it’s different again. So I changed it to the current way, but that didn’t help with what I needed, which is to add the time/date as a version number.

    But with this new information, I was able to find the correct keywords to google the solution. For anyone interested, I used the second code listed on the Child Themes page, and modified the second part:

    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        $parenthandle = 'parent-style'; 
        $theme = wp_get_theme();
        wp_enqueue_style( $parenthandle, get_template_directory_uri() . '/style.css', 
            array(),  
            $theme->parent()->get('Version')
        );
    $themecsspath = get_stylesheet_directory() . '/style.css';  // this is added
        wp_enqueue_style( 'child-style', get_stylesheet_uri(),
            array( $parenthandle ),
        filemtime( $themecsspath )  // this replaces the get('Version') line
        );
    }

    So the parent style shows the version listed in its file: 1.0.17
    And the child style shows the version derived from the creation time/date of the file itself: 1617237081

    Hope this helps someone, and thanks to @joyously for pointing me in the right direction. ??

    Thread Starter SaladGoat

    (@saladgoat)

    Yes, I am aware of the limited options and have it already set to show only an excerpt, but I am talking more about the rest of the content. For instance, it shows the name and Gravatar of the author, neither of which is shown on the website as it is unnecessary. Maybe I’d like to change the wording of “Read more of this post” or remove the option to click Comment before they have even read the article. Or maybe it would be nice to have the email layout and design match the layout and design of the website itself. Just a lot of things that would be nice to customize.

    Thread Starter SaladGoat

    (@saladgoat)

    I disagree that this problem is resolved.

    Your plugin requires another plugin to turn off something that should be optional.

    Seems like an easy fix: add a switch that I can turn it off with.

    Thread Starter SaladGoat

    (@saladgoat)

    I use a child theme, so no worries about overwriting the functions.php file when updating the parent theme. And I did put that code at the bottom of the functions.php.

    Everything else in the child functions file works. And I’m assuming Code Snippets just appends the code to the end of that file anyway, right? So it’s exactly the same … yet the code in functions.php doesn’t work but the exact same code works when switched on in Code Snippets.

    Why would that be?

    Thread Starter SaladGoat

    (@saladgoat)

    That is fantastic! I love it!
    Thank you @andraganescu

    Thread Starter SaladGoat

    (@saladgoat)

    Hi Jen, thanks for the pointers.

    I don’t really understand the point of Code Snippets – just keep your stuff there instead of in functions.php? Why not just put it in functions.php?

    I tried that code you provided but it did not work – in functions.php. But I put it in Code Snippets and it worked!

    So now I’m really confused!

    Thread Starter SaladGoat

    (@saladgoat)

    I saw that, but was hoping to avoid using yet another plugin, especially as everything else about WordPress’s gallery presentation is fine, and all I need to do is shorten the captions.

    Can you point me to the code you found for the backend? I couldn’t find anything….

    Thread Starter SaladGoat

    (@saladgoat)

    Speaking of themes made me go digging deeper.

    In the parent theme’s functions.php is this line:
    require get_template_directory() . '/inc/jetpack.php';

    Following that, I find this line in that file:
    add_theme_support( 'jetpack-responsive-videos' );

    Now, I can’t just delete that, since it’s in the parent theme, so how do I reverse it in my child theme? Is it simply a matter of adding
    remove_theme_support( 'jetpack-responsive-videos' );
    in my functions.php? Or is there more to it than that?

    Thanks!

    Thread Starter SaladGoat

    (@saladgoat)

    You’re Jetpack support and you don’t know if it’s a feature or not? Well, hopefully the following requested info will help you figure it out….

    What I found in my Page Source (screenshot): https://snipboard.io/PQ6ojp.jpg

    Jetpack’s code to add to functions.php (which I did not add and does not exist in my functions.php):
    https://jetpack.com/support/responsive-videos/

    Some other site’s code to remove the option (complicated code):
    https://jetpack.wp-a2z.org/oik_api/jetpack_responsive_videos_remove_wrap_oembed/

    Thread Starter SaladGoat

    (@saladgoat)

    I was so close! I just couldn’t figure out the $link part. I guess that’s pretty much the whole thing, though sooo…. lol

    Yes, this works perfectly.

    Thank you so much for your patience and your help!

    Thread Starter SaladGoat

    (@saladgoat)

    I’m sorry, I am completely lost now. I’m very new to php. I got this code from a website, so I only just barely understand what each bit of code does.
    Adding ‘get’ to the beginning of the lines shows nothing and I am unclear on what string I am meant to replace.
    And that’s after over an hour of googling and trying different things. Whatever they are telling me, it’s not sinking in.
    I really appreciate your sticking with me and hope you can further guide me to what I need to do.
    Thank you!

    Thread Starter SaladGoat

    (@saladgoat)

    Thanks for the first part. Didn’t make much sense on first reading, but once I started putting it in the code, I got it. And it works as hoped, so thanks for that!

    The second part, about the target, I think I must have said it wrong. I *want* the base target for the rest of the page to be _blank. I’m the one who put that in the header. But I want the previous/next links to open in the same tab/window. And I am hoping there is a way to add target="_self" into the %link, somehow.

    Having now looked at the codex for that value, I think it may not be possible, but I understand very little of this code, so thought I would ask again, if it is possible, and if so, how do I do it?

    Thanks!

    Thread Starter SaladGoat

    (@saladgoat)

    I should have been clearer: I am referring specifically to images that are inserted into the body of the post. NOT galleries.
    Thanks!

Viewing 15 replies - 31 through 45 (of 192 total)