Is it possible to add a share button (for Facebook

Is it possible to add a share button (for Facebook and twitter) to the listing ads on this plugin?

I would like people to be able to share listing/ad more easily.

  • Jack Kitterhing
    • Code Norris

    Hi there @Mathew,

    Hope you're well today, you could add the shortcode, when you add the actual listing, but this is manually done and it could be forgotton.

    A better way would be to edit the directory template and use something like this

    echo do_shortcode('[really_simple_share button="facebook_like"]');

    So that it will do that for each and every listing :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Mathew
    • Design Lord, Child of Thor

    What do you mean by UI-Front? The only way I know of editing any PHP files is by going to plugins > editor > Directory. There I still don't see a single-listing.php file. Can you please put this is a simplier method?

  • Mathew
    • Design Lord, Child of Thor

    I have searched up and down these files to try to add this, but nothing. The closest I have came to is is /ui-admin/... but there still isn't a single-listing.php inside that. I would really like to get this done, could someone please help me.

  • Mathew
    • Design Lord, Child of Thor

    Ok, I found it, but how do I get that file onto the plugin without messing up the current configuration? I had to have one of your programers for this plugin to actually impletment somethings onto this plugin that I don't want to loose.

  • Mathew
    • Design Lord, Child of Thor

    I was having an issue with using PayPal on my website and you made it where users will go through the payment process before creating a listing. What started the problem was that my users didn't see the "create a listing" button, and I then after that was the PayPal problem.

  • Mathew
    • Design Lord, Child of Thor

    Ok so my current question still remains. I now know where the /ui-front/single-listing.php file is, but I dont know how to implement it into the Directory plugin. Could you guys give me a "For Dummies" type of direction for it?

  • Mathew
    • Design Lord, Child of Thor

    I appreciate the info, but I do know this part, I just don't know how to get the change to show up into the plugin. Right now the file is just sitting on my computer, it isn't on my dashboard yet where the other files for the plugin sit. So, how do I get this file placed within the plugin?

  • Mathew
    • Design Lord, Child of Thor

    Well the only way I know how to find that file is with the .zip file that I first got when I downloaded the plugin. So, if I change that file which is in the .zip file, I don't have to upload the updated zip file at all, just leave it alone?

  • Arnold
    • El Macho WP

    Ahh I was assuming you knew you need to change the file on the actual web server.

    The usual way is to FTP to your server a copy of just the new file to replace the file currently on your web server. From your Wordpress root it would be at

    /wp-content/plugins/directory/ui-front/general/single-listing.php

    Just overwrite that one file with the new copy.

    If you don't understand FTP, then you need to learn just for maintenance on your site. There are other ways but FTP is by far the easiest.

    Note that if you later update the plugin you would need to modify the file again because it would be overwritten on the update.

  • Mathew
    • Design Lord, Child of Thor

    Ok, thanks for all the advice. Here is my current issue. I have placed the code in the area shown below. But now for some reason, I have part of code showing up on my listing page. Can you guys see what I have did wrong?

    `?php if(has_post_thumbnail() ) the_post_thumbnail( array( 275, 100 ), array( 'class' => 'alignleft' ) ); ?>

    <echo do_shortcode('[really_simple_share button="facebook_share"]');>

    <div class="entry-meta">
    <?php the_dr_posted_on(); ?>
    <?php do_action('sr_avg_rating'); ?>
    <p>
    <span class="comments">
    <?php comments_popup_link(
    __( 'No Reviews »', DR_TEXT_DOMAIN ),
    __( '1 Review »', DR_TEXT_DOMAIN ),
    __( '% Reviews »', DR_TEXT_DOMAIN ),
    '',
    __( 'Reviews Off;', DR_TEXT_DOMAIN )
    ); ?>
    </span>
    </p>
    <?php the_dr_posted_in(); ?>

    <?php if ( !is_user_logged_in() ) : ?>
    <?php echo '<p class="must-log-in">' . sprintf( __( 'You must be logged in to rate item.', DR_TEXT_DOMAIN), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post->ID ) ) ) ) . '</p>'; ?>
    <?php else: ?>
    <?php do_action('sr_rate_this'); ?>
    <?php endif; ?>
    </div>

  • Mathew
    • Design Lord, Child of Thor

    Ok, here is what I did. I tried to fix this myself and I replaced the single-listing.php file with the original so I could start over. I also downloaded the Simple Share Facebook.... plugin so that i could test this. Well, when I had the code into the file, I thought that it worked so I asked the question above. Well, when I removed the code from the file and replaced it with the original code, it still showed the facebook share button. So, I figured out that the code didn't work for me at all. Now everything is good. Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.