WordPress.org

Ready to get started?Download WordPress

Forums

Can't get a link to post (8 posts)

  1. bnther
    Member
    Posted 4 years ago #

    My links won't post. They read right, but it gives me a fatal error whenever I click one.

    Any help?

  2. hilj
    Member
    Posted 4 years ago #

    You mean you're trying to add a link to your blogroll?

  3. bnther
    Member
    Posted 4 years ago #

    I generated links from a query and when I'm hovering over them, I can see that it's got the right page id, but when I click the link it gives me a fatal error.
    Here's the code:

    <?php
    /* Template name: Event Calender */
    ?>

    <?php get_header();?>

    <div id="calenderList">
    <span class="newsHeader">Events Calender</span>

    <?php query_posts('category_name=eventCalender');?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    <table width="325px">
    <tr>
    <td width="200px"><b>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title();?></b></td>
    <td class="alignRight"><?php the_meta();?></td>
    </tr>
    </table>
    <div class="divider"></div>
    <?php endwhile; else:?>
    <p> nothing doing</p>
    <?php endif; ?>
    <?php wp_reset_query(); ?>
    </div>

    <div class="eventCalendarHolder"><?php the_content(); ?></div>

    <?php get_footer();?>

  4. hilj
    Member
    Posted 4 years ago #

    You didn't have an anchor tag. Try this.

    <?php
    /* Template name: Event Calender */
    ?>
    
    <?php get_header();?>
    
    <div id="calenderList">
    	<span class="newsHeader">Events Calender</span>
    	<?php query_posts('category_name=eventCalender');?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    		<table width="325px">
    			<tr>
    				<td width="200px">
    					<b>
    						<a href="<?php echo get_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title();?></a>
    					</b>
    
    				</td>
    				<td class="alignRight"><?php the_meta();?></td>
    			</tr>
    		</table>
    	<div class="divider"></div>
    	<?php endwhile; else:?>
    		<p> nothing doing</p>
    	<?php endif; ?>
    	<?php wp_reset_query(); ?>
    </div>
    
    <div class="eventCalendarHolder"><?php the_content(); ?></div>
    
    <?php get_footer();?>
  5. bnther
    Member
    Posted 4 years ago #

    hiji

    Thanks for the reply. I did have the anchor tag in there, you just can't see it because I didn't have it in a code bracket (it rendered it blue).

    This is one that really has me floored. When I hover over the links, it'll show the right page number...so I know that the links are there, I just can't pull up the content on them. What gives?!!

  6. hilj
    Member
    Posted 4 years ago #

    Okay I don't really have any real ideas but try playing with the permalinks, try %postname% or something...

    And use the code thingy to post code here.

  7. hilj
    Member
    Posted 4 years ago #

    I don't really have any real ideas how to solve this but try playing with the permalinks, try just %postname%.

    And use code to post code.

  8. bnther
    Member
    Posted 4 years ago #

    post_name() is a no-go. It's still doing the same thing it always has. It was worth a try though.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.