Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How to check if we are on current tab

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #237959
    Ayanize
    Participant

    My theme option page is with tabs. How I can check if I am on current tab so that I can echo some information. I tried with this

    function show_message(){
    
    if( isset( $_GET['tab'] ) && $_GET['tab'] == 'tab_2' ){
    echo 'This message';
    else{
    echo 'That Message';
    }
    }
    add_action('admin_head','show_message');
    
    

    But no luck. Again tried with this

    global $pagenow;
    if (( $pagenow == 'admin.php' ) && $page == 'theme_options' && ($_GET['tab'] == 'tab_2')) {
    
    

    Still no luck.

    Thanks in advance

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.