Forum Replies Created

Viewing 11 replies - 16 through 26 (of 26 total)
  • I hav’nt seen any poll, you may have removed it from your page. Any how you can change the color from polls.css or add it to your theme’s css.
    .poll-question{color:#yello!important}
    .wp-polls ul li,
    .wp-polls-ul li,
    .wp-polls-ans ul li{color:#yello!important}
    replace your color with yello

    Dont understand around the poll. If you want to add border for whole poll content add this line to your css
    .wp-polls{border: 1px solid black;}

    simply remove %POLL_RESULT_URL% from
    wp-polls/polls-templates

    which user level you are checking. As admin or as editor?

    Thread Starter Haris

    (@kanuharis)

    Thanks, It worked..
    Added crossdomain.xml to root, now everything works fine
    regards
    Haris

    glad to know that worked

    Thread Starter Haris

    (@kanuharis)

    can u contact me on my mail? because this is a big client of mine and they do not like to share their identity. hariskanu(at)gmail(dot)com. thanks in advance.

    I don’t know why its not working. Its works fine on my custom theme. Did you pasted below code to functions.php?

    // add poll for editors
    add_action('activate_wp-polls/wp-polls.php', 'tc_add_poll_permissions');
    function tc_add_poll_permissions()	{
    	$add_role = get_role('editor');
    	if(!$add_role->has_cap('manage_polls')) {
    		$add_role->add_cap('manage_polls');
    	}
    }
    // remove poll admin options for editors
    function tc_remove_poll_menus () {
    	global $current_user;
    
    	if (!current_user_can('administrator')) :
    		global $menu;
    		global $submenu; 
    
    		//remove poll sub menus
    		unset($submenu['wp-polls/polls-manager.php'][2]);   //poll options
    		unset($submenu['wp-polls/polls-manager.php'][3]);   //poll template
    		unset($submenu['wp-polls/polls-manager.php'][4]);   //uninsall plugin
    	endif;
    }
    add_action('admin_menu', 'tc_remove_poll_menus');

    hmm.. forgot to tell you one thing. You should deactivate and activate the plugin after adding the above code to functions.php
    Please update if it worked..

    First Add below code to your theme’s functions.php.

    // add poll for editors
    add_action('activate_wp-polls/wp-polls.php', 'tc_add_poll_permissions');
    function tc_add_poll_permissions()	{
    	$add_role = get_role('editor');
    	if(!$add_role->has_cap('manage_polls')) {
    		$add_role->add_cap('manage_polls');
    	}
    }

    Second: If you want to restrict poll menu to “Manage Poll and Add Poll”
    (hide menu like uninstall and Poll options from editors)add this code

    // remove poll admin options for editors
    function tc_remove_poll_menus () {
    	global $current_user;
    
    	if (!current_user_can('administrator')) :
    		global $menu;
    		global $submenu; 
    
    		//remove poll sub menus
    		unset($submenu['wp-polls/polls-manager.php'][2]);   //poll options
    		unset($submenu['wp-polls/polls-manager.php'][3]);   //poll template
    		unset($submenu['wp-polls/polls-manager.php'][4]);   //uninsall plugin
    	endif;
    }
    add_action('admin_menu', 'tc_remove_poll_menus');

    Haris

    (@kanuharis)

    Its not a big thing as you think if you use template tag. Just add
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
    and use css to show the image the way you want.
    to change the thumbnail size check this link Click here

    the full code

    <?php
    echo '<ul>';
    $posts = wmp_get_popular( array( 'limit' => 10, 'post_type' => 'post', 'range' => 'monthly' ) );
    global $post;
    if ( count( $posts ) > 0 ): foreach ( $posts as $post ):
        setup_postdata( $post );
        ?>
        <li><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('your_custom_thumbnail'); ?></a><a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a></li>
    
        <?php
    endforeach; endif;
    echo '</ul>';
    ?>

    Thread Starter Haris

    (@kanuharis)

    Nobody here to help?

Viewing 11 replies - 16 through 26 (of 26 total)