Answers.Body: <p>It appears you are confused about the difference between a CiviCRM Extension and a WordPress Plugin.</p>
  
  <p>I would recommend you to write a native CiviCRM extension and enable it from the civicrm/administer page (you might need to set up the extension directory path first).</p>
  
  <p>If you generate an extension with civix, it will take care of reading the xml to handle the url of the page you created and all the stuff you'd need to support your custom tab</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T08:33:18.140Z
Answers.LastActivityDate: 2015-04-15T16:44:37.050Z
Answers.LastEditDate: 2015-04-15T16:44:37.050Z
Answers.UserDisplayName: Xavier
Answers.Body: <p>Have you done a clearcache (/civicrm/clearcache)?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T15:14:24.413Z
Answers.Text: My problem is doesn't read my order.xml and it is in the same directory as my tab implementation and redirect to different page.
Answers.UserDisplayName: Nilda Cervantes
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T17:04:14.820Z
Answers.Text: I have XML file in my hook add new tab file to pass control to my extension's code, but doesn't work
Answers.UserDisplayName: Nilda Cervantes
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T16:40:03.833Z
Answers.Text: @NildaCervantes my clearcache request is because CiviCRM needs it to update the callbacks so it know which page to call for which url? It happens to me every now and then that I forget this and then my new link does not work. If you did that and it still does not work there is another problem.
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T06:21:28.707Z
Answers.LastActivityDate: 2015-04-14T06:21:28.707Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>1- I create a plugin with my hook :</p>
  
  <p>function wordpress_civicrm_tabs( &amp;$tabs, $contactID ) {
      // unset the contribition tab, i.e. remove it from the page
      //unset( $tabs[1] );</p>
  
  <pre><code>// let's add a new "contribution" tab with a different name and put it last
  // this is just a demo, in the real world, you would create a url which would
  // return an html snippet etc.
  
  $url = CRM_Utils_System::url('civicrm/order',"reset=1&amp;snippet=json&amp;force=1&amp;cid=$contactID" );
  $tabs[] = array( 'id'    =&gt; 'orderTab',
                   'url'   =&gt; $url,
                   'title' =&gt; 'Orders',
                   'weight' =&gt; 1 );
  </code></pre>
  
  <p>}</p>
  
  <p>With this function I added a new tab.</p>
  
  <p>2- I enter in Administer/System Settings/Directory the location of my extension ..wp-content\plugins\ccbc_order_tab\ccbc.order\</p>
  
  <p>3- I use civix to create my extension ccbc.order and in my folder I create a page:order</p>
  
  <p>4.- My order.xml created in xml/Menu/order.xml it shows:</p>
  
  <p>
  
    
      civicrm/order
      CRM_Order_Page_Order
      Order
      access CiviCRM
    
  </p>
  
  <p>5- at the moment my page redirects to CRM/Contact/Dashboard.tpl.</p>
  
  <p>Please can you help, what settings I missed?</p>
  
  <p>Thank You</p>
  
  <p>Nilda</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-14T02:24:18.263Z
Comments.Text: Hi Nilda, you seem to be making some progress but having some difficult early steps like many others have had. You might want to review options for taking a developer training course in your area if there are any as a convenient way to get going.
Comments.UserDisplayName: Joe Murray
Tags: <extension>
Title: After creating my extension, what is the root for my new tab?
ThreadText: # After creating my extension, what is the root for my new tab?
  
  (Asked by: username_0 on 2015-04-13)
  
  1- I create a plugin with my hook :
  
  function wordpress\_civicrm\_tabs( &$tabs, $contactID ) {
  // unset the contribition tab, i.e. remove it from the page
  //unset( $tabs[1] );
  
  ```
  // let's add a new "contribution" tab with a different name and put it last
  // this is just a demo, in the real world, you would create a url which would
  // return an html snippet etc.
  
  $url = CRM_Utils_System::url('civicrm/order',"reset=1&snippet=json&force=1&cid=$contactID" );
  $tabs[] = array( 'id'    => 'orderTab',
                   'url'   => $url,
                   'title' => 'Orders',
                   'weight' => 1 );
  
  ```
  
  }
  
  With this function I added a new tab.
  
  2- I enter in Administer/System Settings/Directory the location of my extension ..wp-content\plugins\ccbc\_order\_tab\ccbc.order\
  
  3- I use civix to create my extension ccbc.order and in my folder I create a page:order
  
  4.- My order.xml created in xml/Menu/order.xml it shows:
  
  civicrm/order
  CRM\_Order\_Page\_Order
  Order
  access CiviCRM
  
  5- at the moment my page redirects to CRM/Contact/Dashboard.tpl.
  
  Please can you help, what settings I missed?
  
  Thank You
  
  username_0
  
  **Tags:** extension
  
  > **Comments:**
  > **username_1**: Hi username_0, you seem to be making some progress but having some difficult early steps like many others have had. You might want to review options for taking a developer training course in your area if there are any as a convenient way to get going.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-04-15. Score: 3
  
  It appears you are confused about the difference between a CiviCRM Extension and a WordPress Plugin.
  
  I would recommend you to write a native CiviCRM extension and enable it from the civicrm/administer page (you might need to set up the extension directory path first).
  
  If you generate an extension with civix, it will take care of reading the xml to handle the url of the page you created and all the stuff you'd need to support your custom tab
  
  
  ---
  
  ### Answer by username_3 on 2015-04-14. Score: -1
  
  Have you done a clearcache (/civicrm/clearcache)?
  
  > **Comments:**
  > **username_0**: My problem is doesn't read my order.xml and it is in the same directory as my tab implementation and redirect to different page.  
  > **username_0**: I have XML file in my hook add new tab file to pass control to my extension's code, but doesn't work  
  > **username_3**: @username_0 my clearcache request is because CiviCRM needs it to update the callbacks so it know which page to call for which url? It happens to me every now and then that I forget this and then my new link does not work. If you did that and it still does not work there is another problem.  
  
  ---
  
  