Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter dsh2016

    (@dsh2016)

    Ok I figured out I had to edit the php file in C-Panel..

    ..and put ‘cat’ =>3 below the line mentioned above. 3 being the number of the category name as far as I can tell.

    class AC_Recent_Posts_Widget extends WP_Widget {

    function AC_Recent_Posts_Widget() {
    // Settings
    $widget_ops = array( ‘classname’ => ‘ac_recent_posts_widget’, ‘description’ => ‘Displays your most recent articles. With or without thumbnails’ );

    // Create the widget
    $this->WP_Widget( ‘ac_recent_posts_widget’, __(‘ACOSMIN: Recent Posts’, ‘acosmin’), $widget_ops );
    }

    function widget( $args, $instance ) {
    extract( $args );

    // Widget Settings
    $title = apply_filters(‘widget_title’, $instance[‘title’] );
    $recent_posts_number = $instance[‘recent_posts_number’];
    $hide_recent_thumbs = isset( $instance[‘hide_recent_thumbs’] ) ? $instance[‘hide_recent_thumbs’] : false;

    echo $before_widget;

    // Widget Front End Output
    if ( $title ) {
    echo $before_title . $title . $after_title;
    }

    $args = array(
    ‘posts_per_page’ => $recent_posts_number,
    ‘cat’ => 3,
    ‘ignore_sticky_posts’ => 1

    But after loading the widget and saving, all i get is a sentence under the recent posts widget that says “No popular posts available!”

    Any ideas?

    thanks

Viewing 1 replies (of 1 total)