WordPress Theme Access Pages

I am modifying a wordpress theme to have a mobile menu. However, I don’t have much experience with WP or PHP, so I need you to tell me what function/code WP uses to access the pages on the top bar. Also, which doc should I modify? (The theme is Vantage)

Related posts

Leave a Reply

1 comment

  1. you can edit header.php located in

    wp-content/themes/vantage/header.php
    

    UPDATE

    here is function on gist.github.com i wrote for my project

    function get_current_template_name($return = FALSE) {
            $files = get_included_files();
            $templateIndex = (count($files)-2);
            $string = $files[$templateIndex];
            $templateName = end(explode(DIRECTORY_SEPARATOR, $string));
            if($return) return $templateName;
            else echo $templateName;
    }
    
    
    // Calling | this will print the current template name
    get_current_template_name(); 
    
    // Calling with Bool Param 
    $tmpl_file = get_current_template_name(TRUE);
    if($tmpl_file == 'page.php') echo "this page is using default page template";