• Resolved rozard

    (@rozard)


    Hi,

    This is the best plugin I found. I just need some help to make it work better for me. I have another profile plugin where users can see their posted post and comments. I’m thinking to delete that plugin and just have one. Is there a way I can edit My Account page. Either add user’s post and comments tab or link that plugin’s page to CL’s My Account page or replace Favorite and dashboard tab to those? I just don’t want to have multiple My Account or Profile pages in my website. If you help me edit it that’ll be great and I can get rid of other plugin. I really appreciate your help and thank you for making such an amazing Classified Listing plugin.

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author RadiusTheme

    (@techlabpro1)

    Hello,

    We have hook you can add by hook

    <?php
    
    use Rtcl\Helpers\Functions;
    
    add_filter( 'rtcl_advanced_settings_options', array( __CLASS__, 'add_store_end_point_options' ) );
    add_filter( 'rtcl_account_menu_items', array( __CLASS__, 'add_store_menu_item_at_account_menu' ) );
    add_filter( 'rtcl_my_account_endpoint', array( __CLASS__, 'add_my_account_store_end_points' ) );
    
    function add_store_end_point_options( $options ) {
       $position = array_search( 'myaccount_listings_endpoint', array_keys( $options ) );
       if ( $position > - 1 ) {
          $option = array(
             'myaccount_store_endpoint' => array(
                'title'   => __( 'Store', 'classified-listing-store' ),
                'type'    => 'text',
                'default' => 'store'
             )
          );
          Functions::array_insert( $options, $position, $option );
       }
    
       return $options;
    }
    
    function add_store_menu_item_at_account_menu( $items ) {
    
       $items = $items + [ 'store' => __( 'Store', 'classified-listing-store' ) ];
    
       return $items;
    }
    
    function add_my_account_store_end_points( $endpoints ) {
       $endpoints['store'] = Functions::get_option_item( 'rtcl_advanced_settings', 'myaccount_store_endpoint', 'store' );
    
       return $endpoints;
    }
    Thread Starter rozard

    (@rozard)

    Thank you for replying. I’m having trouble to find the hook. If you don’t mind, can let me know that where I can find it? if you walk me through the steps.

    I really appreciate it.

    Thread Starter rozard

    (@rozard)

    I tried to add the above code in end of functions.php page and getting below error;

    Your PHP code changes were rolled back due to an error on line 238 of file wp-content/themes/newspress-lite/functions.php. Please fix and try saving again.
    syntax error, unexpected ‘<‘, expecting end of file

    238 line where code (<?php) start. I removed <?php from the code, it’s not showing me an error from php page but it removed all the tabs from My Account, like Dashboard, My Listings, Favourites, Account details, and Logout. Will you please help me to make this work. Thank you

    Plugin Author RadiusTheme

    (@techlabpro1)

    <?php 
    
    use Rtcl\Helpers\Functions;

    add this line at the top of the functions.php

    remove existing <?php at the top

    Thanks

    Thread Starter rozard

    (@rozard)

    I’m sorry for bothering you. I added above line top of the functions.php and removed exiting <?php, nothing changed.

    Thread Starter rozard

    (@rozard)

    I know you’re busy, sorry for bothering you. Can I have short code for users listing page? I mean right now there many tab in my account including my listing. Is there way that I can get a short link of My Listing which I’ll include to Profile page? I really appreciate your time. Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How can add tabs in My Account page’ is closed to new replies.