Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

add class from Pinterest to post-thumbnail


  #1  
Old Nov 10, 2015, 01:32 AM
_kimberley's Avatar
_kimberley
 
47 posts · Dec 2011
Amsterdam
I would like to add some html to the featured post thumbnail, but the thumbnail only! I would like to add data-pin-no-hover="true" and nopin="nopin" from Pinterest
  #2  
Old Nov 10, 2015, 04:24 AM
juggledad's Avatar
juggledad
 
23,499 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
There is no theme option for this, you will need to edit bfa_post_parts.php and add your code into it. search for 'function bfa_post_bodycopy'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 10, 2015, 06:05 AM
_kimberley's Avatar
_kimberley
 
47 posts · Dec 2011
Amsterdam
Only no option for html
PHP Code:
if(has_post_thumbnail()): ?>
                <a href="<?php the_permalink() ?>"> <?php the_post_thumbnail(); ?></a>
and if I search for the_post_thumbnail(), I think it will be a global configuration... or not?
  #4  
Old Nov 10, 2015, 08:55 AM
juggledad's Avatar
juggledad
 
23,499 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you can put html there, you just have to make sure you swap between the php and html - if it's in between a <?php and ?> it is php, outside that it is html
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Nov 11, 2015, 12:10 AM
_kimberley's Avatar
_kimberley
 
47 posts · Dec 2011
Amsterdam
Not something like <img src="image.jpg" class="nopin" width="100px" height="100px"> right?
  #6  
Old Nov 11, 2015, 03:19 AM
juggledad's Avatar
juggledad
 
23,499 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
ahhh, the <img...> is generated in the the_post_thumbnail() function which is a WordPress function and not part of the theme. You can pass parameters to it. see https://codex.wordpress.org/Function...post_thumbnail
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Add a Postís Category Name to Body Class johnnybravo Header configuration & styling 4 Feb 21, 2013 04:22 AM
Has anybody gotten Pinterest to work with Atahualpa? jodymace Atahualpa 3 Wordpress theme 2 Jan 14, 2013 05:56 PM
Add Pinterest Button to top of post kanga Atahualpa 3 Wordpress theme 1 Nov 2, 2012 10:15 PM
[SOLVED] Post excerpts include thumbnail and post picture mkellam Center area post/pages 2 Jun 15, 2011 01:43 PM
How to Show Just the Post Title & Post Thumbnail rayrey Atahualpa 3 Wordpress theme 1 Dec 12, 2010 04:58 PM


All times are GMT -6. The time now is 02:21 AM.


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