Forum Replies Created
-
AuthorPosts
-
December 4, 2014 at 8:44 pm in reply to: Child theme – open links of post format link in a new window #363212
OK; Thanks.
Can I use another element to achieve what I need? Open posts of link type to the destination url?M
December 4, 2014 at 8:43 pm in reply to: Child theme – open links of post format link in a new window #363211OK; Thanks.
M
December 3, 2014 at 5:07 pm in reply to: Child theme – open links of post format link in a new window #362256FYI – i did get the site to come back with your code in it, but the only thing that was different was that the links now open up in a new tab. They still go to the post, and not the “external” url…
December 3, 2014 at 5:04 pm in reply to: Child theme – open links of post format link in a new window #362249This reply has been marked as private.December 2, 2014 at 8:52 pm in reply to: Child theme – open links of post format link in a new window #361757Ismael, My apologies for taking so long to respond; I’ve been swamped with a couple of other projects.
I just tried the code above with no results…
if you go to this page: http://www.driverlesstransportation.com on the right column is a “magazine” widget under Latest news. That block is set up to display posts from the category “news.” pretty much 100% of the posts in that category are of “Link” type to an external URL. We want it set up so that when a user clicks the link it just sends them to the “external” url, NOT the wordpress post page.
Actually – no matter where a post of “link” type appears we want to send users to the designate link. never to the wordpress post. right now it takes our users two clicks to visit the designated url.
Does it make sense?
- This reply was modified 9 years, 11 months ago by frescova. Reason: fixed typo
Thanks Elliott; Got it to work.
Disregard please; I figured it out.
Perfect; Thanks. that fixed it.
I figured it out. It was a separate plugin I added. I tried the css you recommended but it didn’t work; I’ll figure it out though – now that I know I’m on the right track…
THANKS! Did you do the same to remove all the “user data” form under the user avatars? My bbpress instance display entirely too much information.
BTW, I appreciate you responding to this – especially since it has nothing to do with Enfold…
Doh! I have looked at those fields for hours – can;t believe I did that; THANK you for helping, and sorry for the stupid user error…
This reply has been marked as private.Any other bbPress plugins or tidbit you care to recommend?
Thanks guys!
Thanks Yigit!
September 16, 2014 at 2:51 am in reply to: Child theme – open links of post format link in a new window #319533Thanks Yigit, but It’s still not doing what I need…
It works perfect here:
https://www.driverlesstransportation.com/news
I want it to do the same exact thing for the posts of type link on my home page.
Thanks again for all the effort and support, very much appreciated.
M
September 6, 2014 at 1:37 am in reply to: Child theme – open links of post format link in a new window #314233If you look at the page there are two “magazine” elements on it. THe one on the left is labeled “newsletters” and the one on the right is labeled “Latest News” Items in the one on the right are of post format “link” those should actualy point to the actual “link” defined in the first line of the post, nt the actual “post.” And, I’d like them to open in a separate window.
Basically anything on this page with a format = “link” should open in a new window…
Everything else in the same window. The code you gave me:
function add_custom_target(){ ?> <script> jQuery(window).load(function(){ jQuery('header.entry-content-header a').attr('target','_blank'); }); </script> <?php } add_action('wp_footer', 'add_custom_target');
makes every link on the page open up in a new window…
Thanks in avance…
Yigit – It works perfectly when I edit the theme file, but I want to make sure I do this on the child theme folder (more peace of mind for me if there is a theme update).
I also want to include some custom fields I’ve added to my posts in the “magazine” display; IN the loop it works perfectly – I’ve been using this code:
get_post_meta( get_the_ID(), 'Written By', true );
I wanted to add it as anotherr variable in the render_entry function like:
$writtenBy = get_post_meta( get_the_ID(), 'Written By', true );
and then in the output like this:
$output .= $writtenBy;
But I’m not getting any results.
Am I going about this the right way? Thanks again.
- This reply was modified 10 years, 2 months ago by frescova.
Thanks Yigit; That makes my front page go “blank”
Thanks Yigit!
I’m on a child theme, and if I just drop that file in the same path in my child theme directory nothing happens. Do I need to move over any other files?
Actually it’s “every” link – not just in the magazine element
Thanks Günter! That helped big time; Got it done!
Please ignore; I figured it out.
September 4, 2014 at 2:29 am in reply to: Child theme – open links of post format link in a new window #313162Thanks Yigit;
After I add the code do I need to do anything else? Links are still opening in the same window…
Just to reiterate; I have a page where I added the “Blog Posts” element and have them showing in grid layout “Title Only”. All of the posts in this element are of post format “link”
Yes; I figured that; and have posted actual URLs on the first line of a post of link type; The issue is happening with the featured images though…
September 3, 2014 at 12:33 am in reply to: Child theme – open links of post format link in a new window #312565Perfect! Thank you.
Is there a way to make this also work on the blog element? when viewing as “grid”?
Thanks again.
FYI – I just tried something. The first post on the list where the issue begins occurring was of type “link”. I changed that post type to “default” and the issue went away.. However, when I change it back to post type “link” the issue comes back.
The first line in that post is a “url”
Thanks guys; I deactivated all plug-ins – including the recommended bb-press and the issue persists. The issue is even happening on some of the “dummy” imported data.
OK; Thanks; Let me disable plugins to see what happens…
Thanks Yigit; Just uploaded all the theme files via ftp; No change. I cleared history and browser cache to make sure.
M
-
AuthorPosts