Custom Dashboard

This topic contains 2 replies, has 2 voices, and was last updated by  Ian Butler 9 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #35032

    Ian Butler
    Buyer
    Post count: 59

    Hi Guys,

    Could you tell me which file the loop is in that generates content for this page – /?geodir_dashbord=true&stype=gd_place

    I need to return the listings for the current logged in user.

    I’m guessing I cant just use this?

    
    
    // this call the main page content
    do_action('geodir_author_content');

    Thanks

    #35111

    Paolo
    Site Admin
    Post count: 31206

    Hi Ian,

    I don’t know what file editor you use, but with dreamweaver or simlar programs this is how you’d find this information autonomously.

    1st search in all /geodirectory/ for : geodir_author_content

    It will allow you to find the add_action which is:

    
    
    
    add_action('geodir_author_content', 'geodir_action_author_content', 10);

    So now we would look for function geodir_action_author_content which is right below the add_action.

    inside that function there is another

    do_action('geodir_author_content_inside');

    Searching for geodir_author_content_inside will bring up:

    
    
    add_action('geodir_author_content_inside', 'geodir_action_author_content_inside', 10);
    add_action('geodir_author_content_inside', 'geodir_pagination', 20);

    You may need just the 1st or both depending if you intend to paginate.

    Searching for geodir_action_author_content_inside will bring up:

    
    
    
    function geodir_action_author_content_inside() {//code here}

    That is what you need for sure, for pagination I think now you know how to search the other function.

    Let us know how you went or if you need more details about how to search actions and functions.

    Thanks

    #35287

    Ian Butler
    Buyer
    Post count: 59

    Thanks Paolo,

    I think I’ll bookmark this answer, no doubt I’ll need it again!!

    I must have forgotten to check ‘Notify me of follow-up replies via email’ didn’t think you’d answered so I’ve written the WP_Query myself.

    It’s all working great (thanks for using custom post types) – however there is one thing that isn’t.

    
    
    <ul>
    <li><a href="<?php the_permalink(); ?>"><img src="/wp-content/images/advertise/view-button.png" /></a></li>
    <li><a href="/add-listing/?pid=<?php the_ID(); ?>"><img src="/wp-content/images/advertise/edit-button.png" /></a></li>
    <li><a href="/wp-admin/admin-ajax.php?action=geodir_ajax_action&geodir_ajax=add_listing&ajax_action=delete&pid=<?php the_ID(); ?>"><img src="/wp-content/images/advertise/delete-button.png" /></a></li>
    </ul>

    The view and edit buttons are fine however the delete button does not work – I’m guessing it’s because it requires some other plugin file? The page this code is on is just a standard WP template.

    Do you know what the problem might be?

    Thanks again for your help

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket