Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hispeed88

    (@hispeed88)

    I think I found the problem:

    I have this for the menus added ad the start before I found the nav menu roles plugin and Restricted Authors. This was the reason. This needs to be extended, but I will use the Nav Menu Roles which is better.

    function my_wp_nav_menu_args($args = '') {
        if(is_user_logged_in()) {
            $args['menu'] = 'Navigationsmenue-Logged-in';
        }
        else {
            $args['menu'] = 'Navigationsmenue';
        }
        return $args;
    }
    add_filter('wp_nav_menu_args', 'my_wp_nav_menu_args');
    Thread Starter hispeed88

    (@hispeed88)

    Hi Abhishek,

    I deactivated all the plugins and tried it:

    – Loco Translate
    – Nav Menu Roles
    – Recipe Card Blocks by WPZOOM
    – Restricted Authors.

    No change when I deactivate them.
    The only one which is activated:
    https://ibb.co/B4WkrR9

    What can I do next?

    Thread Starter hispeed88

    (@hispeed88)

    Hi Abhishek,

    With the Loco Translate Plugin it worked. I can translate it.
    Thank you for your help.

    Best Regards,
    hispeed

    • This reply was modified 5 years, 2 months ago by hispeed88.
    Thread Starter hispeed88

    (@hispeed88)

    Hi Abhishek,

    I tried this but it doesn’t work. I have added your code with “YOU MIGHT ALSO LIKE”.
    Do you have a another idea?

    Best Regards
    hispeed

    Thread Starter hispeed88

    (@hispeed88)

    Hi Abhishek,

    Thank you for your reply. Unfortunately it’s not working.

    <?php
    /**
     * Child theme functions
     *
     * When using a child theme (see http://codex.wordpress.org/Theme_Development
     * and http://codex.wordpress.org/Child_Themes), you can override certain
     * functions (those wrapped in a function_exists() call) by defining them first
     * in your child theme's functions.php file. The child theme's functions.php
     * file is included before the parent theme's file, so the child theme
     * functions would be used.
     *
     * Text Domain: oceanwp
     * @link http://codex.wordpress.org/Plugin_API
     *
     */
    
    /**
     * Load the parent style.css file
     *
     * @link http://codex.wordpress.org/Child_Themes
     */
    function oceanwp_child_enqueue_parent_style() {
    	// Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update your theme)
    	$theme   = wp_get_theme( 'OceanWP' );
    	$version = $theme->get( 'Version' );
    	// Load the stylesheet
    	wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'oceanwp-style' ), $version );
    	
    }
    add_action( 'wp_enqueue_scripts', 'oceanwp_child_enqueue_parent_style' );
    
    /**
     * Change the Continue Reading text on Blog Post Entries
       This is working fine!
     */
    function myprefix_post_readmore_link_text() {
    	return 'Weiterlesen';
    }
    add_filter( 'ocean_post_continue_reading', 'myprefix_post_readmore_link_text' );
    
    /**
     * Change the Related Posts title "You Might Also Like" by "Related Posts"
    
    function myprefix_related_posts_title() {
    	return 'Related Posts';
    }
    add_filter( 'owp-string-single-related-posts', 'myprefix_related_posts_title' );
    */
    
    function my_comment_placeholder_text() {
    $text = __( 'MY TEXT', 'oceanwp' );
    return $text;
    }
    add_filter( 'ocean_comment_placeholder', 'my_comment_placeholder_text' );
    
    /* Menu Hide and Show -> This is Working */
    function my_wp_nav_menu_args($args = '') {
        if(is_user_logged_in()) {
            $args['menu'] = 'Navigationsmenue-Logged-in';
        }
        else {
            $args['menu'] = 'Navigationsmenue';
        }
        return $args;
    }
    add_filter('wp_nav_menu_args', 'my_wp_nav_menu_args');
    
Viewing 5 replies - 1 through 5 (of 5 total)