Code Monkey home page Code Monkey logo

Comments (4)

mor10 avatar mor10 commented on May 18, 2024

is_page_template() should work fine. There's nothing in WP Rig blocking core functions.

I'm working on a tutorial around adding a slideshow to WP Rig.

from wprig.

solarianian avatar solarianian commented on May 18, 2024

Hello!
is_page_template is working only if I call the template file from /verbose folder, like:
if ( is_page_template('verbose/page-with-slick.php')) { //slick css wp_register_style( 'wprig-slick', get_theme_file_uri( '/css/slick.css' ), array(), '20180626' ); wp_register_style( 'wprig-slick-theme', get_theme_file_uri( '/css/slick-theme.css' ), array(), '20180626' ); }

Should I reinstall or is normal?

I tried get_page_template_slug(); to see the exact path of template. The result was verbose/page-with-slick.php

thank you

from wprig.

bamadesigner avatar bamadesigner commented on May 18, 2024

Where are you calling is_page_template()? These core functions only work after the main WP Query has been loaded.

If you're calling inside the wp_enqueue_scripts action you should be fine. If you're calling, e.g., inside the init action, then its too early.

from wprig.

bamadesigner avatar bamadesigner commented on May 18, 2024

Hi @solarianian! Since we haven't heard from you in a while, we're going to close the issue. Feel free to comment if you want to chat some more.

from wprig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.