Simple link to "Add New" Classified

Is there a simple "link" for adding a new classified. I understand they go into their Buddypress member profile but is there a way we can add a link in the navigation bar to get them there fast.

  • Vinod Dalvi

    Hi @Alaina,

    I hope you are well today and thank you for your question.

    To add the create Classifieds link to the navigation menu, just add the following code in the functions.php file of your child theme or add it in your site using any of the following plugins.

    http://wordpress.org/plugins/code-snippets/
    http://wordpress.org/plugins/add-actions-and-filters/

    add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2);
    function add_search_box_to_menu( $items, $args ) {
    //    if( $args->theme_location == 'primary' )
        	global $user_login;
            return $items."<li class='menu-item menu-item-classified-link'><a href='".site_url()."/members/".$user_login."/classifieds/create-new/'>".__( 'Add New Classifieds' )."</a></li>";
    
        return $items;
    }

    Also you can add the button in any of your page or post by using the following shortcode that links to the Add Classifieds Page.

    [cf_add_classified_btn text="Add Classified" view="loggedin | loggedout | always"]
    or
    [cf_add_classified_btn view="loggedin | loggedout | always"]<img src="someimage.jpg" />Add Classified[/cf_add_classified_btn]

    Best Regards,
    VInod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.