WordPress.org

Ready to get started?Download WordPress

Forums

Special Recent Posts
Adding widget to non-widget based area not working (13 posts)

  1. NextToInsane
    Member
    Posted 1 year ago #

    I read on the installation tab on how to make the widget work on other places than the sidebar, and so I went to one of my pages and pasted this into the page using the HTML-option:

    <?php // Defining widget options. $args = array(
    'display_thumbnail' => 'no',
    'widget_title_hide' => 'yes',
    'post_limit' => 9999,
    'category_include' => 1
    );
    
    // Function call.
    special_recent_posts($args);
    ?>

    When I do that, though the only part thing that shows up on the page is this in plain text:

    'display_thumbnail' => 'no',
    'widget_title_hide' => 'yes',
    'post_limit' => 9999,
    'category_include' => 1
    );

    // Function call.
    special_recent_posts($args);
    ?>

    Am I adding the code in wrong, or am does it just not work?

    Thanks for making such an easy to use and very important widget! I'm hoping for a response.

    Thanks.

    http://wordpress.org/extend/plugins/special-recent-posts/

  2. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    That's PHP code, and must be written in a file, not in a wordpress page.
    If you wish to embed the plugin using wordpress pages or posts, you have to use the provided shortcode, available in the "Generated Code" Tab.

  3. NextToInsane
    Member
    Posted 1 year ago #

    Thanks! That was easier than I thought!

    However, there is one thing that doesn't work properly, and that's the

    widget_title_hide=yes

    I put it in quotes as well, but it doesn't seem to work, since it's showing anyway.

    Any ideas?

  4. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    Please paste here your shortcode.

  5. NextToInsane
    Member
    Posted 1 year ago #

    [srp
    display_thumbnail=no
    widget_title_hide=yes
    post_limit='999'
    category_include=1]

    What I also seem to have trouble with is to make the height and width of the thumbnail work on another page. Here's the shortcode for that:

    [srp
    display_thumbnail='yes'
    widget_title_hide='yes'
    post_limit='999'
    category_include=6
    thumbnail_width='120'
    thumbnail_height='68']

    For what I seem to notice, it matters whether or not there is code under it.

    If I add

    widget_title='blog'

    underneath, the thumbnail becomes the right height, but it cuts of the sides of the thumnail and makes it square. But for some reason the title doesn't change (which doesn't matter anyway since I don't want the title there to begin with).

    There seems to be some things that doesn't make any sence. I don't know what to do.

  6. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    1 - Provide the URL of your website.
    2 - Your issues are about CSS, so you need to fix some CSS incompatibility between the plugin stylesheet and your theme.

  7. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry one question. Are you using the free or PRO version?

  8. NextToInsane
    Member
    Posted 1 year ago #

    I am using the free version

    Here's a link to a pgae where both the Widget title and the thumbnail thing is happening:

    http://www.nexttoinsane.com/skits/2012-2013/

    I have set the size of the thumbnail to the same size as the thumbnails on the right, but as you can see, they are a lot smaller.

  9. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    I'm sorry, but if i analyze your html, the dimensions set for the thumbnails on the left are 100px x 68px. And this is done directly from the shortcode.

  10. NextToInsane
    Member
    Posted 1 year ago #

    Yes, that's the problem. I have set it to 120 px x 68px in the code, but that's not what the final dimensions come out as. I don't know what to do about it, because I don't see any difference in how the dimensions are set in the right thumbnails vs the left ones.

  11. romanpicisan
    Member
    Posted 1 year ago #

    Hi,

    Maybe this can help. First, go to you theme folder and find the style.css. After that, put the following code at the bottom of that css page.

    .srp-widget-thmb {width: 200px; height: 200px;}

    Put any number as you like to the width and height. Thanks.

  12. NextToInsane
    Member
    Posted 1 year ago #

    Yeah, that did... something. It did change the size of it so that the height is 68, but for some reason it still crops the edges of the thumbnails so that the width is 100 instead of 120. I'm so close I can taste it!

  13. NextToInsane
    Member
    Posted 1 year ago #

    But for some reason it also stretches the image a bit. If i copy the image into photoshop, it says that the height of the image is 68, but when I screenshot the website and compared the both images, you could clearly see that the image was stretched in height, so I have no clue what the heck is going on.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic