• Resolved Zyggmunt

    (@zyggmunt)


    Is it possible to hide prices in ajax search results for non-logged users?

    If it’s possible I could use PHP however CSS code would be also good. It’s a little hard to find proper classes there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Damian Góra

    (@damian-gora)

    Hello,

    WordPress adds a body class if the user is logged in, so you can hide prices in this way:

    
    .logged-in .dgwt-wcas-sp {
    	display: none;
    }
    

    Best
    Damian

    Thread Starter Zyggmunt

    (@zyggmunt)

    Can you please send me class names of these prices in two places?

    Plugin Author Damian Góra

    (@damian-gora)

    My previous answer is wrong. Here is correct CSS:

    
    .dgwt-wcas-sp,
    .dgwt-wcas-pd-price,
    .dgwt-wcas-tpd-price {
    	display: none!important;
    }
    
    .logged-in .dgwt-wcas-sp,
    .logged-in .dgwt-wcas-pd-price,
    .logged-in .dgwt-wcas-tpd-price {
    	display: block!important;
    }
    

    Best
    Damian

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide prices fo non-logged users’ is closed to new replies.