Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Post headers on homepage - Link to pages instead?

Old Mar 10, 2009, 04:14 AM
14 posts · Mar 2009
Post headers on homepage - Link to pages instead?

Hi Is it possibel to change this piece of code in the index.php to point to relevant page slugs instead of post slugs?
		if( !is_single() AND !is_page() ) { ?>
			 <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php
			if (function_exists('the_title_attribute')) { 
			elseif (function_exists('the_title')) { 
			} ?>"><?php 
		} the_title(); 
		if( !is_single() AND !is_page() ) { ?>
		} ?>
Thanks in advance for your help.
Old Mar 10, 2009, 03:21 PM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
What do you mean with "point to". Provide more details, please
Old Mar 10, 2009, 04:40 PM
14 posts · Mar 2009
Hi Flynn.

What I meant is that the piece of code above turns the post header into a link to the post's perm. link.
How can I change this to instead build a url for a different page instead of the post's perm. address?

eg: Lets say the post has a slug of: "target-1" and I give a page that I create the same slug of: "target-1" can this code be changed somehow to point to the PAGE slug instead of the POST slug?

I hope this makes sense. I'm still learning WP and not familiar with all the terms etc.
Old Mar 11, 2009, 12:46 AM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
In that code, replace

PHP Code:
<?php the_permalink() ?>

PHP Code:
<?php echo get_option('home') . '/' $post->post_name '/'?>
This would will create http://your-wordpress-base-url.com/post-slug/
Old Mar 11, 2009, 03:45 PM
14 posts · Mar 2009
Woohoo!!! Absolutely awesome Flynn...


I now have list of posts that link to static pages as long as I give them the same slugs and ammend the default slug directory.


My page is so far from a blog its not even funny ;-)


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest Comment From Each Post on Homepage And Multi-page pages noyell Post-Kicker, -Byline & -Footer 3 Aug 8, 2009 01:39 PM
multiple pages... (homepage) designer666 Atahualpa 3 Wordpress theme 1 May 12, 2009 09:43 AM
how do i get comments to show up on homepage for each post??? drewjones Comments, trackbacks & pings 2 Apr 15, 2009 07:04 PM
Post PHP on one page only, and not homepage blueprairie Plugins & Atahualpa 2 Apr 2, 2009 07:28 AM
Dreamweaver homepage link problem Dealer Bicycles Atahualpa 3 Wordpress theme 4 Jan 31, 2009 04:38 PM

All times are GMT -6. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.