-
Posted in : Bloggy WP
-
Hey I saw this thread http://www.pixelwars.org/forums/topic/insert-permalink-sign-into-post-headerfooter/ which helped with the my theme customization requirements (http://www.pixelwars.org/forums/topic/theme-customization/). I was just wondering if you could assist with a code that would open the links in a new tab/page. check me out at postcodexdotcom
Hi,
– open format-standard.php,
– find:
<a <?php echo $hide_post_title_out; ?> rel="bookmark" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
– edit:
<a target="_blank" <?php echo $hide_post_title_out; ?> rel="bookmark" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
Thanks
Thanks for the response Mehmet but I’m not sure this would work because I have already implemented these instructions given by you in another post.
– open “Custom Fields” from Screen Options. (When in editing screen of a post).
– find the Custom Fields box below.
– click to the “Enter new” link.
– define ext_link name and a value.
– click “Add Custom Field” button.
Now, ext_link is ready to use for all posts. So don’t define it again in another post, just select from the list, then enter a value.
To this step, it works on the back-end side.
From this step, we will add it to the design.
– go to Appearance > Editor > format-standard.php
– find1:
<a rel=”bookmark” href=””>
– edit1:<a rel=”bookmark” href=”ID, ‘ext_link’, true ); ?>”>
– find2:– edit2:
<a title="Permalink" href="”>
I have already created a custom field, edited and added the above code to format-standard.php which works perfectly. My request is to open the post when the title is clicked in a new tab.
Sorry this the full code you gave in this post.
Find 1:
<a rel=”bookmark” href=””>
Edit 1:
<a rel=”bookmark” href=””>
The full code is not showing. Here is the link for the full code
http://www.pixelwars.org/forums/topic/insert-permalink-sign-into-post-headerfooter/This is the title part:
<h1 class="entry-title"> // staff ... </h1>
This is the title link:
<a <?php echo $hide_post_title_out; ?> rel="bookmark" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
Add
target="_blank"to the link:<a target="_blank" <?php echo $hide_post_title_out; ?> rel="bookmark" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>Thank you it worked
Hey I have just noticed that the title of my post act and behaves the way I want it to. But when the link to my post is open via twitter, the post title does not link out to the original content. How do I get the post title to link to the original content from the home page and the post page. hope this makes sense.
Hi, never mind it’s all sorted now. But the title in the single post page appears in #009966 which is the content link colour.
For example;
http://www.postcodex.com/karl-zahn-inspires-future-jewellery-designer/How can I have the colour of my title in the single post page #000000 and keep this #009966 colour for my linked content.
You must be logged in and have valid license to reply to this topic.