Custom CSS In Uploads Folder

If the theme is generating CSS based on theme options then it might choose to do this. Say your theme lets you pick a ‘primary colour’. It might want to style lots of elements in this colour. To do this it would need to output CSS with certain values substituted with your chosen colour. If … Read more

How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?

Changing the default widget would be pretty complicated. However, you can write your own shortcode and function to get your desired list. I’m guessing you want an unordered list in your widget? Put this in your theme’s functions.php: add_shortcode(‘archive_by_year_and_month’,’get_archive_by_year_and_month’); function get_archive_by_year_and_month($atts=array()){ global $wpdb; $years = $wpdb->get_col(“SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_type=”post” AND post_status=”publish” ORDER … Read more

the_content() in single-{post-type}.php problem

First of all, you shouldn’t use get_posts on your CPT archive – WP already creates a query and selects posts that should be display in there. So your archive-pjesma.php should look like this: <?php get_header(); ?> <?php while ( have_posts() ) : the_post(); ?> <h2><a href=”https://wordpress.stackexchange.com/questions/326484/<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <?php // the_content(); ?> <?php … Read more