true mag theme
-
hello.. i try the plugin and i need for my website because i have a lot of pictures but is not working in truemag theme i try the css and some functions from previous post but nothing..
http://prntscr.com/6brm62 (the 2 is normal but the first from external is not working)
-
Hi vl4d. Could you please share a link to your website? The screenshot is not very helpful…
here but now i dont have the plugin on…
π I need you to activate the plugin again and share a couple of links: one with a regular featured image (which should be working) and another with our plugin not working. To help you, I need to see what’s happening exactly.
ok is ON now and i will test this post post
you can see the post in home page down and in inside i have this code to show the featured image
<div style="float:right;"><?php the_post_thumbnail( $size, $attr ); ?></div>is not working i try with ccs codes from other post but nothing changes
I see you’re using the appropriate function (that is,
the_post_thumbnail). If you’re not seeing the featured image, then it means there’s an issue with your CSS rules. Try adding something like:.nelioefi { width: 300px !important; }and it should work! Note you can define whichever width you want!
the css is working but only inside the post, in home page (last post) is not working need other css?? can you check thank you
Hi! Unfortunately, in order to fix this issue one has to edit the source code of the theme. A few months back (actually, almost one year ago) I modified TrueMag so that it could display external featured images. Right now, I don’t know how this theme looks like and what changes were applied by its developers… If you want, you can send me a copy of your theme (customers AT nelio software DOT com) and I’ll take a look at it as soon as I have some spare time (but no promises!).
ok i send, will wait.. (thank you)
[ No bumping please. ]
Hi! Unfortunately, this theme is extremely complex and there’s a lot of files that require some tweaking. I’ll give you some hints and an example of what you have to look for and how you can fix it, but the rest is up to you.
Go edit a file named
loop-item.phpand go to line 263. You’ll see the following piece of code:if(has_post_thumbnail()){ $thumbnail = wp_get_attachment_image_src( /* ... */ ); } else { $thumbnail[0]=function_exists( /* ... */ )/* ... */; }There you can see how TrueMag usually includes featured images in your site:
- It checks whether the current post has a featured image,
- if it does, it obtains the SRC of that image
- if it doesn’t, it adds a default image SRC.
What we have to do is add a tiny piece of code after this if-then-else block that obtains the external featured image (if any). For instance:
if ( function_exists( 'uses_nelioefi' ) && uses_nelioefi( get_the_ID() ) ) { $thumbnail[0] = nelioefi_get_thumbnail_src( get_the_ID() ); }This will check whether the current post uses a external featured image and, if it does, it will override the thumbnail with the proper image. Quite easy, huh?
In the end, the “problem” is only the complexity of reverse engineering the theme and discovering which file(s) is(are) responsible of each part of the final HTML code, addressing them, and tweaking them properly. As I said, however, this is up to you now! If you want me to take care of it, just send me an e-mail and we’ll prepare a quote for this work π
so i try the code like this
<a href="<?php echo $permalink ?>"> <?php if(has_post_thumbnail($post->post_id)){ $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->post_id),'thumb_520x293', true); }else{ $thumbnail[0]=function_exists('tm_get_default_image')?tm_get_default_image():''; } else ( function_exists( 'uses_nelioefi' ) && uses_nelioefi( get_the_ID() ) ) { $thumbnail[0] = nelioefi_get_thumbnail_src( get_the_ID() ); } ?> <img src="<?php echo $thumbnail[0] ?>" alt="<?php the_title_attribute(); ?>" title="<?php the_title_attribute(); ?>"> <?php if($format=='' || $format =='standard' || $format =='gallery'){ ?> <div class="link-overlay fa fa-search"></div> <?php }else {?> <div class="link-overlay fa fa-play"></div> <?php } ?> </a>and is not working
i delete the normal function and replace with yours again nothing in home page is not change is sure from loop-item.php??
The topic ‘true mag theme’ is closed to new replies.