Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter eljass

    (@eljass)

    Hey!

    I have managed to get blade template working by adding both blade and php files.

    All my woocommerce template files are inside theme/template/woocommerce

    Ie. archive-product.php should have the following:

    <?php echo App\Template('woocommerce/archive-product');

    This will use template function from theme/src/helper.php

    This way you can use blade syntax with woocommerce pretty easily.

    Also some template files will need some variables that woocommerce pass to the template. In this case just use template function like this:

    
    <?php echo App\Template('template-file-name', array('variable' => $variable) );

    This may not be the most efficient way to do this job since you have to have two files for one template but atleast it works.

    Check here for some extra information: https://github.com/roots/sage/issues/1807

    • This reply was modified 9 years, 3 months ago by eljass. Reason: Typo fixes
    Thread Starter eljass

    (@eljass)

    Not sure what you mean but it would be necessary to be able to add pages/menu items through WordPress backend in the future. And those new pages should line up like that code.

    Idk if it would be cleaner or better practice to make this with custom nav walker or with javascript.

    I can’t just style these by css because then any new pages added in future wouldn’t have that styling. Right?

    Forum: Hacks
    In reply to: Custom wordpress dashboard
    Thread Starter eljass

    (@eljass)

    Thanks for your answers!

    Codemovement’s last link was very interesting, other two I have already seen.

    Bcworkz, your answer is exactly what I was looking for! Now I just have to start figuring out how to implement is_user_logged_in() function.

    I’m going to add one more link to anyone who is trying to do the same.
    Here is good tutorial of how to redirect dashboard page to other php page:
    http://www.wpexplorer.com/how-to-wordpress-custom-dashboard/

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