Support » Plugin: WordPress Popular Posts » styling list items using copied existing theme tiny

  • Resolved Rhand

    (@rhand)


    Was following https://github.com/cabrerahector/wordpress-popular-posts/wiki/6.-Styling-the-list . I just copied over tiny and added color for list item anchor link to wp-content/themes/theme-in-use/wordpress-popular-posts/themes/tiny/style.css:

    .wpp-tiny li a {
      text-decoration: none;
      color:black;
    }
    
    .wpp-tiny li a:hover {
      text-decoration: underline;
      color:black;
    }

    but I do not see the styles loading. Did we have to copy over the theme or move it over? Any other steps to load the new styling?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Rhand

    (@rhand)

    I added

    
    /**
     * Registers my WPP theme.
     *
     * @param   array   $themes
     * @return  array
     */
    function wp861572_register_my_wpp_theme($themes){
    	// Absolute path to the theme folder's location
    	$themes[] = get_template_directory(__FILE__) . 'wordpress-popular-posts/themes/tiny'; // Use get_template_directory() instead if your WPP theme is inside a WordPress theme directory.
    
    	return $themes;
    }
    add_filter('wpp_additional_themes', 'wp861572_register_my_wpp_theme');

    `

    but it does not seem to help and I was not certain it was needed.

    • This reply was modified 5 months, 1 week ago by Rhand.
    • This reply was modified 5 months, 1 week ago by Rhand.
    • This reply was modified 5 months, 1 week ago by Rhand.
    • This reply was modified 5 months, 1 week ago by Rhand.
    Thread Starter Rhand

    (@rhand)

    Perhaps the issue is because I am added the widget theme copy in child-theme/wordpress-popular-posts/themes/tiny and not in parent theme? Also see https://github.com/cabrerahector/wordpress-popular-posts/issues/321

    Tried get_stylesheet_directory() . '/wordpress-popular-posts/themes/imwz as well, but do not see the style loading either.. imwz being just a copy of tiny with name change..

    • This reply was modified 5 months, 1 week ago by Rhand.
    • This reply was modified 5 months, 1 week ago by Rhand.
    • This reply was modified 5 months, 1 week ago by Rhand.
    • This reply was modified 5 months, 1 week ago by Rhand.
    Thread Starter Rhand

    (@rhand)

    This works

    
    /**
     * Registers my WPP theme.
     *
     * @param   array   $themes
     * @return  array
     */
    function wp861572_register_my_wpp_theme($themes){
    	// Absolute path to the theme folder's location
    	$themes[] = get_stylesheet_directory() . '/wordpress-popular-posts/themes/imwz'; // Use get_template_directory() instead if your WPP theme is inside a WordPress theme directory.
    
    	return $themes;
    }
    add_filter('wpp_additional_themes', 'wp861572_register_my_wpp_theme');

    `

    Just then needed to pick it as theme from the Gutenberg block. It was registered well this way after all.

    • This reply was modified 5 months, 1 week ago by Rhand.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.