WordPress.org

Ready to get started?Download WordPress

Forums

I Recommend This
[resolved] Added to content.php to get on front page, not working (9 posts)

  1. zjb407
    Member
    Posted 8 months ago #

    So I added
    <?php if( function_exists('dot_irecommendthis') ) dot_irecommendthis(); ?>

    to my functions.php in order to get it to show on the homepage that shows the most recent posts. Now it shows up, however the voting/adding doesn't work.

    My website is http://www.radlovestories.com it's pretty obvious it's not working. Clinking the link just goes to http://www.radlovestories.com/#

    Let me know if there's any other workaround

    Thanks

    http://wordpress.org/plugins/i-recommend-this/

  2. Harish Chouhan
    Member
    Plugin Author

    Posted 8 months ago #

    @zjb407. I checked your site but did not see the voting icon anywhere. Also can you let me know why the code is added to your functions.php file? It should be added to your theme file such as index.php or someother where your post loop exists.

  3. zjb407
    Member
    Posted 8 months ago #

    Yes sorry my mistake.
    1) I added it to the content.php, not the functions.php
    2) my host had changed my website a bit but now it should be back to normal

    I think it may be working now.

    However I have also not been able to display the TOP posts. I put the code

    [dot_recommended_posts container='div' post_type='showcase' number='2' year='2013' monthnum='11']

    In the text field for the page labelled TOP. However nothing shows up. Am I supposed to put this code somewhere else?

    Thanks for your help and your prompt response.

  4. Harish Chouhan
    Member
    Plugin Author

    Posted 8 months ago #

    @zjb407 Glad it working.

    regarding the shortcode, yes the one you have is correct. Can you let me know which page you have added it too? http://www.radlovestories.com/top/

    WHen you add it, do change to text editor instead of visual and than add the shortcode.

  5. zjb407
    Member
    Posted 7 months ago #

    Yes I added the short code to
    http://www.radlovestories.com/top/
    however nothing shows up on the webpage.
    Nothing shows up in the visual field after I input the shortcode into the text field either.
    Very strange, thanks so much for your help.

  6. Harish Chouhan
    Member
    Plugin Author

    Posted 7 months ago #

    @zjb407 You mentioned earlier the shortcode you are using has post_type='showcase'. Are you sure your PostType's name is showcase?

  7. zjb407
    Member
    Posted 7 months ago #

    I gues I'm not sure what the post type is.

    When I inspect the element it gives:
    <article id="post-88" class="post-88 post type-post status-publish format-standard hentry">

    I have tried changing the 'showcase'
    [dot_recommended_posts container='div' post_type='showcase' number='2' year='2013' monthnum='11']
    to content, post-status, post.status, etc. but nothing has changed.

    I'm surprised nothing shows up on the page at all. Maybe I need to change the 'div' to something else?

    Thanks again for your assistant.

  8. Harish Chouhan
    Member
    Plugin Author

    Posted 7 months ago #

    You simply have to change showcase to post

    [dot_recommended_posts container='div' post_type='post' number='2' year='2013' monthnum='11']

    post_type is a field in the WordPress database. When you add a post, its post type is just post. When someone adds products using WooCommerce plugin, the post type is "product". On my website flattrendz.com the gallery is created using custom post type called "showcase".

    Once you use the above code, if it still does not work, adjust your month number or year. You can even remove monthnum to calculate top rated from all posts of a year.

  9. Harish Chouhan
    Member
    Plugin Author

    Posted 7 months ago #

    Also, if you do like the plugin, would appreciate your feedback on http://wordpress.org/support/view/plugin-reviews/i-recommend-this

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.