Link to other blog post showing up at top of page??
-
I have only made two posts to my blog. Now when I link directly to each post (MYSITE.COM/POSTNAME) , there is a link right at the top of the page to the other post. It’s right above my title and I don’t really like how it looks. Why is it doing that and is there anything I can do to change it?
-
That is theme related. These seem to be your previous-post and next-post link but in words, rather than in “<<previous post next post>> or something like that.
Does not look good with long titles (I take it they are in a smaller font).
Checksingle.php
in your theme folder for something like this:<div class="navigation"> <div class="alignleft"><?php previous_post_link('« %link') ?></div> <div class="alignright"><?php next_post_link('%link »') ?></div> </div>
and then read this:
https://codex.www.ads-software.com/Next_and_Previous_LinksNote: before changing anything in sch files make a safe backup copy of that file. The changed file has to be on the server of course.
Are you on the default theme?
No. I’m using a theme from Artisteer. I’ll be honest, I don’t even know how to go in and change files like you were referring to. I’m very much a beginner with WordPress. I’d probably really mess something up. Sounds like it’s something I should have changed in Artisteer before I downloaded it.
well, you could paste the code from your theme’s single.php here
https://wordpress.pastebin.com/and report back a link, maybe someone can help…..it’s an easy fix
I appreciate your help SOOO much, but I’m afraid I’m going to have to show my ignorance here. I have no idea what you’re referring to with pasting the code and so forth. All I’ve done to this point is build sites using Homestead’s Sitebuilder, so I’m not a web designer by any stretch of the imagination. And I’m starting to think maybe WordPress is a little out of my league.
The link to a post on my blog (please don’t laugh, it’s my first) is here:
https://ovarian-cysts-treatments.com/naturaltreatmentforovariancysts
I really hate that ugly link being at the top. I found this plugin online that looks like it might be able to at least shorten it. Do you think there would be any danger in giving it a try?
https://www.filmtraveler.com/2008/11/18/wordpress-plugin-shorten-link-text/
Again, thank you so much.
well….single.php is a file in your theme. With some hosts you can log onto the server, look at and edit files online. With others you can’t edit online. But basically we need the code that is in that single.php file inside of your theme to be able to help you out….
Yes, I think I can access the files through HostGator. I’ll go in and if I can find what you’re talking about.
Thanks.
the file will be:
wordpress install(I think you have WP in your root, not in a directory)
then into wp-content folder
then into themes folder
and on into whatever theme you have installedso /wp-content/themes/YOURTHEME/single.php
Is this what you would need?
single.php
PHP script text
——————————————————————————–<?php get_header(); ?>
<div class=”art-contentLayout”>
<div class=”art-content”><?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$prev_link = get_previous_post_link(‘« %link’);
$next_link = get_next_post_link(‘%link »’);
?>
<?php if ($prev_link || $next_link): ?>
<div class=”art-Post”>
<div class=”art-Post-body”>
<div class=”art-Post-inner art-article”><div class=”art-PostContent”>
<div class=”navigation”>
<div class=”alignleft”><?php echo $prev_link; ?></div>
<div class=”alignright”><?php echo $next_link; ?></div>
</div></div>
<div class=”cleared”></div></div>
<div class=”cleared”></div>
</div>
</div><?php endif; ?>
<div class=”art-Post”>
<div class=”art-Post-body”>
<div class=”art-Post-inner art-article”>
<h2 class=”art-PostHeader”>
” rel=”bookmark” title=”<?php printf(__(‘Permanent Link to %s’, ‘kubrick’), the_title_attribute(‘echo=0’)); ?>”>
<?php the_title(); ?>
</h2>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php the_time(__(‘F jS, Y’, ‘kubrick’)) ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><?php _e(‘Author’, ‘kubrick’); ?>: <?php the_author_posts_link() ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can(‘edit_post’, $post->ID)): ?><?php ob_start(); ?><?php edit_post_link(__(‘Edit’, ‘kubrick’), ”); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class=”art-PostHeaderIcons art-metadata-icons”>
<?php echo implode(‘ | ‘, $icons); ?></div>
<?php endif; ?>
<div class=”art-PostContent”><?php if (is_search()) the_excerpt(); else the_content(__(‘Read the rest of this entry »’, ‘kubrick’)); ?>
<?php if (is_page() or is_single()) wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?></div>
<div class=”cleared”></div>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php printf(__(‘Posted in %s’, ‘kubrick’), get_the_category_list(‘, ‘)); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><?php the_tags(__(‘Tags:’, ‘kubrick’) . ‘ ‘, ‘, ‘, ‘ ‘); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && !is_single()): ?><?php ob_start(); ?><?php comments_popup_link(__(‘No Comments »’, ‘kubrick’), __(‘1 Comment »’, ‘kubrick’), __(‘% Comments »’, ‘kubrick’), ”, __(‘Comments Closed’, ‘kubrick’) ); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class=”art-PostFooterIcons art-metadata-icons”>
<?php echo implode(‘ | ‘, $icons); ?></div>
<?php endif; ?></div>
<div class=”cleared”></div>
</div>
</div><?php comments_template(); ?>
<?php endwhile; ?>
<?php else: ?>
<h2 class=”center”><?php _e(‘Sorry, no posts matched your criteria.’, ‘kubrick’); ?></h2>
<?php endif; ?></div>
<?php include (TEMPLATEPATH . ‘/sidebar1.php’); ?>
</div>
<div class=”cleared”></div><?php get_footer(); ?>
I just looked at your last post. Maybe I did the wrong thing. Here is what I think you might be talking about.
single.php
PHP script text
——————————————————————————–<?php get_header(); ?>
<div class=”art-contentLayout”>
<div class=”art-content”><?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$prev_link = get_previous_post_link(‘« %link’);
$next_link = get_next_post_link(‘%link »’);
?>
<?php if ($prev_link || $next_link): ?>
<div class=”art-Post”>
<div class=”art-Post-body”>
<div class=”art-Post-inner art-article”><div class=”art-PostContent”>
<div class=”navigation”>
<div class=”alignleft”><?php echo $prev_link; ?></div>
<div class=”alignright”><?php echo $next_link; ?></div>
</div></div>
<div class=”cleared”></div></div>
<div class=”cleared”></div>
</div>
</div><?php endif; ?>
<div class=”art-Post”>
<div class=”art-Post-body”>
<div class=”art-Post-inner art-article”>
<h2 class=”art-PostHeader”>
” rel=”bookmark” title=”<?php printf(__(‘Permanent Link to %s’, ‘kubrick’), the_title_attribute(‘echo=0’)); ?>”>
<?php the_title(); ?>
</h2>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php the_time(__(‘F jS, Y’, ‘kubrick’)) ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><?php _e(‘Author’, ‘kubrick’); ?>: <?php the_author_posts_link() ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can(‘edit_post’, $post->ID)): ?><?php ob_start(); ?><?php edit_post_link(__(‘Edit’, ‘kubrick’), ”); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class=”art-PostHeaderIcons art-metadata-icons”>
<?php echo implode(‘ | ‘, $icons); ?></div>
<?php endif; ?>
<div class=”art-PostContent”><?php if (is_search()) the_excerpt(); else the_content(__(‘Read the rest of this entry »’, ‘kubrick’)); ?>
<?php if (is_page() or is_single()) wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?></div>
<div class=”cleared”></div>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php printf(__(‘Posted in %s’, ‘kubrick’), get_the_category_list(‘, ‘)); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><?php the_tags(__(‘Tags:’, ‘kubrick’) . ‘ ‘, ‘, ‘, ‘ ‘); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && !is_single()): ?><?php ob_start(); ?><?php comments_popup_link(__(‘No Comments »’, ‘kubrick’), __(‘1 Comment »’, ‘kubrick’), __(‘% Comments »’, ‘kubrick’), ”, __(‘Comments Closed’, ‘kubrick’) ); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class=”art-PostFooterIcons art-metadata-icons”>
<?php echo implode(‘ | ‘, $icons); ?></div>
<?php endif; ?></div>
<div class=”cleared”></div>
</div>
</div><?php comments_template(); ?>
<?php endwhile; ?>
<?php else: ?>
<h2 class=”center”><?php _e(‘Sorry, no posts matched your criteria.’, ‘kubrick’); ?></h2>
<?php endif; ?></div>
<?php include (TEMPLATEPATH . ‘/sidebar1.php’); ?>
</div>
<div class=”cleared”></div><?php get_footer(); ?>
Okay. I’m not sure what’s going on. When I paste the code in, it changes a little after the message gets posted. Maybe I need to be doing this a different way. You said something about the pastebin?
“Sounds like it’s something I should have changed in Artisteer before I downloaded it.”
I would give that a try and; maybe it’s a setting or choice within the “theme building”package that Artisteer is.
When yes, you can simply upload you theme after your changes, just like you did the first time.Thanks for all the help. I’m going to go back to Artisteer and see what I can do there.
- The topic ‘Link to other blog post showing up at top of page??’ is closed to new replies.