Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter mhuynh55

    (@mhuynh55)

    In the Custom Field, I just add the image name: image.jpg. On my other blog, this works perfectly ok but for this new blog I created, it does not work.

    Thread Starter mhuynh55

    (@mhuynh55)

    Is it clashing with the way I have set up the template page?

    Thread Starter mhuynh55

    (@mhuynh55)

    I would appreciate for further help. This is my single.php file:

    <div id="content">
    
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
          <div class="post" id="post-<?php the_ID(); ?>">
    <div style="float:right;  color: #242424; font-weight:bold; font-size: 12px; text-transform: uppercase; font-family: 'Courier New', sans-serif;"><?php
    $category = get_the_category();
    echo $category[0]->cat_name;
    ?></div>
            <div class="entry">
    
         <a class="posttitlelink" href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a><br />
    <?php echo get_post_meta($post->ID, 'Photography by', true); ?>
              <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
              <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    <span class="date"><?php the_date(); ?></span>
    
            </div>
    
    </div>
    
    <?php if(is_single()) { // single-view navigation ?>
    	<?php $posts = query_posts($query_string); if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<?php previous_post_link(); ?> | <?php next_post_link(); ?>
    	<?php endwhile; endif; ?>
    <?php } else { // archive view navigation ?>
    		<?php posts_nav_link(); ?>
    <?php } ?>
    
        <?php endwhile; ?>
      <?php else: ?>
        <h2 class="posttitle center">Not found.</h2>
        <p>Sorry, no posts matched your criteria.</p>
      <?php endif; ?>
    
        </div>
    <?php get_sidebar(); ?>
    <div style="clear:both;"></div>
    <?php get_footer(); ?>
    Thread Starter mhuynh55

    (@mhuynh55)

    The display of the page was fine but if you a link the post title and select it to view that post only, it still duplicates that post down the page, instead of showing just that one post.

    Thread Starter mhuynh55

    (@mhuynh55)

    I’ve tried to implement that (I quickly had to revert because it didn’t work). Selecting a single post still spits out multiple duplicates.

    Thread Starter mhuynh55

    (@mhuynh55)

    This is what happens if I implement it: link

    Thread Starter mhuynh55

    (@mhuynh55)

    Oh I’m sorry, but this is what I had previously to control the problem:

    <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    Thread Starter mhuynh55

    (@mhuynh55)

    So basically what I have done is that WordPress Page with that custom template attached calls for a category with specific wordpress posts in it. But yes, the only problem I am encountering is the fact when you click on one of the posts, it should only show that post’s content only, but it doesn;t.

    Thread Starter mhuynh55

    (@mhuynh55)

    Cheers for the reply. The pastebin url is located here: https://wordpress.pastebin.com/51ny2Cyt

    Thread Starter mhuynh55

    (@mhuynh55)

    I should also have mentioned that I have pulled some of these posts on my frontpage. These special posts have been styled so that an img thumb that represents the post + the excerpt. I use the second custom field to pull the image thumb and I use this:

    <?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?>
             <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
            <img src="<?php bloginfo('url'); echo get_option('sirup_upload_path'); $values = get_post_custom_values("Image"); echo $values[0]; ?>" alt="" width="95" height="95"<?php echo get_option('sirup_thumb_cat'); ?>"/></a>
             <?php } ?>
    Thread Starter mhuynh55

    (@mhuynh55)

    Update: my WordPress admin says I have 19 categories but they aren’t listed and checking in PHPMyAdmin, there seems to be no errors.

    Thread Starter mhuynh55

    (@mhuynh55)

    If anyone else requires future reference, the solution was just to amend the code and add &exclude=10 to:

    <?php wp_dropdown_categories('orderby=name&show_count=1<strong>&exclude=10</strong>&show_option_none=Select Category'); ?>
    <script type="text/javascript">
      var dropdown = document.getElementById("cat");
      function onCatChange() {
    	if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
    		location.href =
    		"<?php echo get_option('home');?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
    	}
        }
        dropdown.onchange = onCatChange;
    </script>
    Thread Starter mhuynh55

    (@mhuynh55)

    Oh no, I’m not dismissing it mfields, really appreciating your help right now but I seem to be stuck because it’s not working properly. And I have tried it what you have told me.

    What I have done now is deleted the categories as my menu. I’ve instead just used a normal a href link as ‘home’ that links my main front page. But for some reason, it thinks my recent posts is my front page. My front page however uses special categories as modules.

    Please see my website: https://www.culturesinbetween.net/NEWWEBSITE/
    And this is how what I want to appear in the Articles page: https://www.culturesinbetween.net (do you see the right hand-side of the page?)

    Thread Starter mhuynh55

    (@mhuynh55)

    If I did that, the Articles pages won’t display all my recent posts. It displays a duplicate of my front home page. This is because I am using the custom theme I am using. I want it to show my posts one by one under each other which is what it isn’t doing.

    Thread Starter mhuynh55

    (@mhuynh55)

    One thing however, my website I am working on: https://www.culturesinbetween.net/NEWWEBSITE/ is a custom theme. The front page is the way I like it. Like I previously mentioned, I would like the Articles page (at top) when clicked, will show and populate all the posts I have published like a normal blog where its in reverse chronological order. However, I don’t know if the theme can adjust what you have told me.

    It’s also why I asked you about the image thumbnails. Because I also thought what I could do for the Articles page is be able to have short snippets of each post. So an image thumbnail preview next to an excerpt of the whole post only. Then there is a link so that a person can read the whole post.

Viewing 15 replies - 1 through 15 (of 19 total)