• Resolved kemio

    (@kemio)


    I need to adjust a couple of html tags depending on the page the book tables show on. For example, I want to change the h2 tag for the book titles to h3 tags for a list of books showing on the home page (added via the shortcode). I try conditionally to change via is_front_page and nothing happens. Specifcally, I notice that trying to query the page id, keeps returning 0 when trying to use get_the_ID or if using global $wp_query;$post_id = $wp_query->get_queried_object_id();, returns the id of the book term. It seems that all the templates are inside a query. Is there a work around?
    My site is not live yet so I can’t share an link.

Viewing 1 replies (of 1 total)
  • Thread Starter kemio

    (@kemio)

    I resolved the issue by creating a global variable on the template file the that checks to see if is_front_page and called that variable on the mybooktable title.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘Change html conditionally, per page’ is closed to new replies.