• Hi there
    Due to National Mourning in Poland I have quickly switched theme to black grounded pyrymont-v2 theme. The problem is the construction of the page includes categories and their content to be shown instead of their head only. Meaning, by clicking on any category I can see only heads of the entries. But I need whole posts collected in pages in date order. Where can I find the part of the code I can change to see it full ?
    thanks in advance for your help

    regards
    PIMOS from Poland

Viewing 4 replies - 1 through 4 (of 4 total)
  • You need to look in your theme’s category template file, This could be category.php, archive.php or index.php (in that order).

    Thread Starter pimos

    (@pimos)

    Thanks a lot for your suggestions.
    There is no category.php file in this theme at all.
    In archive file I did not find the part od code could be have impact, in index file I got somes :

    <div class="postmeta">
    						<?php _e('Category', 'pyrmont_v2'); ?>:&nbsp;<span class="category"><?php the_category(', ') ?></span>&nbsp;/
    						<?php
    							$tag = get_the_tags();
    							if(!$tag){
    								echo __('Tags: no tag /', 'pyrmont_v2');
    							}
    							else{
    						?>
    						<?php _e('Tag', 'pyrmont_v2'); ?>:&nbsp;<?php the_tags('<span>',',&nbsp;','</span>'); ?>&nbsp;/
    						<?php } ?>
    						<span class="comments"><?php comments_popup_link(__('Add Comment', 'pyrmont_v2'), __('1 comment', 'pyrmont_v2'), __('% comments', 'pyrmont_v2')); ?></span>
    						<?php edit_post_link(__('Edit', 'pyrmont_v2'), ' / ', ''); ?>
    					</div><!-- end postmeta -->
    				</div><!-- end title -->
    				<div class="clear"></div>
    
    				<?php if (!(is_tag()) && !(is_category())){ ?>
    				<div class="entry">
    					<?php the_content(__('</p><p>Read More >></p>', 'pyrmont_v2')); ?>
    					<div class="clear"></div>
    				</div><!-- end entry -->

    Is there any part responsible for displaying the head only ?

    regards

    If the theme doesn’t have a category.php file, archive,php will be controlling the display.

    Thread Starter pimos

    (@pimos)

    Clear now. Unfortunately I do not know all php commands, so maybe you’re able to indicate the part of the code to change.

    $lastpost = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_date <'" . current_time('mysql') . "' AND post_status='publish' AND post_type='post' AND post_password='' ORDER BY post_date DESC LIMIT 1");
    			$output = get_option('hfy_archives_'.$lastpost);
    			if(empty($output)){
    			$output = '';
    			$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'hfy_archives_%'");
    			// Get all of the months that have posts
    			$monthquery = "SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM " . $wpdb->posts . " WHERE post_date <'" . current_time('mysql') . "' AND post_status='publish' AND post_type='post' AND post_password='' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC";
    			$monthresults = $wpdb->get_results($monthquery);
    
    			if ($monthresults) {
    				// Loop through each month
    				foreach ($monthresults as $monthresult) {
    					$thismonth	= zeroise($monthresult->month, 2);
    					$thisyear	= $monthresult->year;
    
    			// Get all of the posts for the current month
    			$postquery = "SELECT ID, post_date, post_title, comment_count FROM " . $wpdb->posts . " WHERE post_date LIKE '$thisyear-$thismonth-%' AND post_date AND post_status='publish' AND post_type='post' AND post_password='' ORDER BY post_date DESC";
    			$postresults = $wpdb->get_results($postquery);
    
    			if ($postresults) {
    				// The month year title things
    				$text = sprintf('%s %d', $month[zeroise($monthresult->month,2)], $monthresult->year);
    				$postcount = count($postresults);
    				$output .= '<p style="margin-bottom: 10px;">' . $text . '&nbsp;(<span class="archivesnumber">' . count($postresults) . '</span>)</p>';
    				$output .= "<ul class='archiveslist'>\n";
    
    				foreach ($postresults as $postresult) {
    					if ($postresult->post_date != '0000-00-00 00:00:00') {
    						$url = get_permalink($postresult->ID);
    						$arc_title	= $postresult->post_title;
    						if ($arc_title)
    							$text = wptexturize(strip_tags($arc_title));
    						else
    							$text = $postresult->ID;
    						$title_text = 'e_(\'Read Post &quot;\', \'pyrmont_v2\'' . wp_specialchars($text, 1) . '&quot;';
    						$output .= '	<li>' . mysql2date('m-d', $postresult->post_date) . ':&nbsp;' . "<a href='$url' title='$title_text'>$text</a>";
    						$output .= '&nbsp;(' . $postresult->comment_count . ')';
    						$output .= "</li>\n";
    					}
    				}
    				$output .= "</ul>\n\n";
    			}
    		}
    		update_option('hfy_archives_'.$lastpost,$output);
    	}else{
    		$output = '<strong>'. __('ERROR:') .'</strong> '. __('No items were found to be displayed.') .'';

    I got feeling it could be this one :
    $text = $postresult->ID;

    regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘pyrmont-v2 categories head links help needed for rookie’ is closed to new replies.