Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter marvelxx

    (@marvelxx)

    Hi Andrew, is there a difference between making the change in the additional CSS way or trough the CSS.style itself?
    there no red border on my site.
    BTW, the underscore theme is a parent theme I didn’t make him a child theme(because this project is just for showoff in my portfolio.

    Thread Starter marvelxx

    (@marvelxx)

    I’m really confused :/

    is it possible that you can edit the code and show me how its need to be if I want to include just one custom post type called “cars” that will show up in my archives page?
    (it’s my first-time im facing custom post type and the plugin and I’m sitting hours on it )

    thank you!

    • This reply was modified 7 years, 1 month ago by marvelxx.
    Thread Starter marvelxx

    (@marvelxx)

    I added the code as the guide said, but when I’m trying to show the archives in the page it says it doesn’t find any posts.(I’m using the archives element with element builder)

    <?php
    /**
     * Child theme functions
     *
     * When using a child theme (see http://codex.ww.wp.xz.cn/Theme_Development
     * and http://codex.ww.wp.xz.cn/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.ww.wp.xz.cn/Plugin_API
     *
     */
    
    /**
     * Load the parent style.css file
     *
     * @link http://codex.ww.wp.xz.cn/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' );
    
    function my_cptui_add_post_types_to_archives( $query ) {
    	// We do not want unintended consequences.
    	if ( is_admin() || ! $query->is_main_query() ) {
    		return;    
    	}
    
    	if ( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
    		$cptui_post_types = cptui_get_post_type_slugs();
    
    		$query->set(
    			'post_type',
    			array_merge(
    				array( 'post' ),
    				$cptui_post_types
    			)
    		);
    	}
    }
    add_filter( 'pre_get_posts', 'my_cptui_add_post_types_to_archives' );

    if its matter, I’m using oceanWp theme.

    Thread Starter marvelxx

    (@marvelxx)

    Hi, thank you for the response!

    ok, I read it before but didn’t get it, I need “Adding all CPTUI post types to the archives” or “just only CPTUI post types”?

    and where exactly I should add the code in the function.php?

    thank again!

    Thread Starter marvelxx

    (@marvelxx)

    ok, thanks for all the help !

    Thread Starter marvelxx

    (@marvelxx)

    Hi, so I created the nav menu, not custom.

    I think I know what was the problem – you are right – doesn’t make sense to make both home and contact page as a custom link I guess the problem was because of that.
    I deleted the page and created it again as a page and not custom link so now its works 🙂

    one more question, did you noticed the “active” links on both front page and mobile?
    I know it’s because the link that is highlighted are elements in the same page, cant find a seloutin.
    and ideas?

    and thanks again!,
    tal.

    Thread Starter marvelxx

    (@marvelxx)

    Hi, the links between the far right and far left is taking you to different parts at the home page, isn’t it?

    yes, the black footer is on the home and contact page purposely.

    the far right is defined home page and far left as contact page.

    ill take a screenshot of the menu structure.

    links for snapshots:
    https://ibb.co/cE80re
    https://ibb.co/micFPz

    thanks again.

    Thread Starter marvelxx

    (@marvelxx)

    Hi, thanks for the quick response! , yes that’s the menu I talking about sorry(its Hebrew).

    the contact page is here http://car-batteries.co.il/contact

    in the desktop version, the far left takes to the contact page and far right is home page so its ok.

    but the problem is in the mobile view the last link.

    I cleaned cache several times and nothing :\

Viewing 8 replies - 1 through 8 (of 8 total)