Forum Replies Created

Viewing 15 replies - 1 through 15 (of 1,612 total)
  • Have you tried the fix described here?

    Last time I tested, hidden products show up in the sitemap, too, without a fix:

    
    // Exclude hidden products from the sitemap.
    add_filter(
        'wp_sitemaps_posts_query_args', function ( $args, $post_type ) {
            if ('product' !== $post_type ) {
                return $args;
            }
            
            if (!isset($args['post__not_in'])) {
                $args['post__not_in'] = array();
            }
            array_push(
                $args['post__not_in'], 
                2600, 
                2543, 
                2497, 
            );
            return $args;
        }, 10, 2
    );
    

    You’ll need to replace the:

    
    2600, 
    2543, 
    2497, 
    

    with the list of product IDs of your hidden products. That’s a hassle if your list of hidden products frequently changes, but I haven’t found a better way without running a query as the snippet linked above does.

    Forum: Plugins
    In reply to: [Menu In Post] No Link Text
    Plugin Author linux4me2

    (@linux4me2)

    Excellent. That’s important information. I’m glad you got things figured out.

    Forum: Plugins
    In reply to: [Menu In Post] No Link Text
    Plugin Author linux4me2

    (@linux4me2)

    Good work!

    Does my plugin work for you in multisite without the “Network: True” set?

    Forum: Plugins
    In reply to: [Menu In Post] No Link Text
    Plugin Author linux4me2

    (@linux4me2)

    So you’ve got the plugin network enabled, you’ve added the “Network: True” to the plugin file menu-in-post.php, and still get the same result?

    Have you tried the other option, enabling the plugin on all subsites–even the ones where you don’t need it–to see what effect that has?

    Plugin Author linux4me2

    (@linux4me2)

    Hi @collimarco,

    I just noticed this post. I never got a notification that you posted.

    The plugin has not been tested with WPML. I am not sure if it is compatible or not. If you try it, please post back with your results.

    Plugin Author linux4me2

    (@linux4me2)

    Hi @vishanjad,

    I haven’t heard from you in a while, so I’m going to mark this as resolved.

    Forum: Plugins
    In reply to: [Menu In Post] No Link Text
    Plugin Author linux4me2

    (@linux4me2)

    I don’t use multisite, and consequently haven’t tested the plugin with it, so the problem you are seeing is most likely due to that, though it could be a conflict with another plugin or theme.

    All the Menu In Post plugin really does is use a shortcode to add a menu using modified WordPress functions, and from what I’ve found searching the Internet, shortcodes in plugins and multisite may have issues.

    I found this post with a workaround (enable the plugin on all sites to use the plugin on a subsite) as well as a suggested fix.

    I would try the following to see if it works if you don’t want to enable the plugin on all sites.

    Edit the file menu-in-post.php (on single site, it’s in wp-content/plugins/menu-in-post), and add:

    
    Network: True
    

    to the end of the comments at the top so it looks like this:

    
    /**
     * Plugin Name: Menu In Post
     * Description: A simple but flexible plugin to add menus to a post or page.
     * Author: linux4me
     * Author URI: https://profiles.wordpress.org/linux4me
     * Text Domain: menu-in-post
     * Version: 1.1.8
     * License: GPL3
     * License URI: https://www.gnu.org/licenses/gpl-3.0-standalone.html
     * Network: True
     */
    

    After you’ve modified and saved the file, activate the plugin from the Network Admin. According to what I’ve found, that should make the shortcodes used by Menu In Post active on all your sites.

    I can’t test this, but the main thing is that if you try the fix, you want a network install of the plugin, and the modification to the file adding “Network: True”.

    Please let me know what you find out.

    Plugin Author linux4me2

    (@linux4me2)

    Hi @pitowner,

    I haven’t heard back from you in a couple of weeks, so I’m going to mark this as resolved. Feel free to post again if you have more questions that I can help with.

    Plugin Author linux4me2

    (@linux4me2)

    Hi Vishan,

    If you can set up a menu for the listing pages in WP Admin > Appearance > Menus, then I don’t see why it wouldn’t work.

    Thread Starter linux4me2

    (@linux4me2)

    Okay, thanks for letting me know. I will take a look at the EWWW Image Optimizer.

    Plugin Author linux4me2

    (@linux4me2)

    I’m glad you like the plugin.

    You can add CSS to customize the look of the menus in WordPress Admin > Appearance > Customize > Additional CSS, or in the style.css of your child theme.

    Arranging the 3-4 drop-down menus horizontally is also something you would do with custom CSS. If you provide a link to the page you’re working on, I, or someone else here, will take a look and try to help you out.

    While you’re doing this kind of thing, you will find the developer tools that come with Chrome and Firefox very helpful. You can right-click an element on a web page–like one of your drop-down menus–and choose “Inspect” from the pop-up menu to open the Developer Tools panel, which will show you the CSS assigned to any particular element as well as allow you to add your own CSS to test live before you add anything to your site.

    I suspect the developers will fix this eventually, so I recommend altering the file in the parent theme, /wp-content/themes/twentyten/functions.php by changing line 743 from this:

    
    require get_stylesheet_directory() . '/block-patterns.php';
    

    to this:

    
    require get_template_directory() . '/block-patterns.php';
    

    The function get_template_directory() will “[i]n the case a child theme is being used, the absolute path to the parent theme directory will be returned,” which will resolve the error for now, and won’t leave you with a potentially outdated copy of block-patterns.php in your child theme folder.

    Once the developers release a fix, the edited file will be overwritten, and you’ll be all good.

    Forum: Plugins
    In reply to: [Menu In Post] Mobile View
    Plugin Author linux4me2

    (@linux4me2)

    I don’t like the look of a wrapping horizontal menu. I think what I would do is wrap your custom code in a media query, so that the menu displays vertically unless the device/display is wide enough for the menu to display horizontally without wrapping.

    For example, say your menu starts wrapping when the display is less than 768 pixels wide, your CSS would look something like:

    
    @media only screen and (min-width: 768px) {
        .inlinemenu {
            float: none;
          padding-right: 25px;
          padding: -20px;
          padding-bottom: 10px;
          width: -3px;
          height: 0px;
          top: 9px;
          margin: 0px;
          list-style: none;
        }
    }
    

    You can use your browser’s developer tools’ mobile view to test the width to see what you need to substitute for the 768 pixels. Both Chrome and Firefox have that capability.

    Plugin Author linux4me2

    (@linux4me2)

    I’m glad you got it working. Thanks for posting your CSS.

    linux4me2

    (@linux4me2)

    I switched themes to a child theme of Twenty Twenty, and the snippet worked, so I think that particular problem was at my end.

Viewing 15 replies - 1 through 15 (of 1,612 total)