Jump to content


Photo
- - - - -

Putting a small icon after content in posts


  • Please log in to reply
4 replies to this topic

#1 mmunger

mmunger

    Advanced Member

  • Members

  • 34 posts
  • LocationMontréal
  • Framework Version:DMS 2
  • Country: Country Flag

Posted 18 January 2014 - 03:57 AM

Hi guys,

 

I am trying to figure out how to add something cute to my blog: a small icon (as an image) right after the dot of the last paragraph in every post. Just like magazines do, in order to mark the end of an article's content.

 

My first guess would be to put in a hook in the functions.php file of my base theme, but... which?

 

I'm afraid that if I use pagelines_loop_after_post_content it will go much below the last paragraph, not at the end of it.

 

Help?

 

I use Framework 2.4.4 on

Please Login or Register to see this Hidden Content



#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 18 January 2014 - 11:58 AM

Hi there, if you install the actionmap plugin -

Please Login or Register to see this Hidden Content

and activate on your site this will show you on the page exactly where each hook appears. So go to the single post page, activate actionmap once installed via the top left of the wp admin bar (there's a button for actionmap that will appear) and it will show you all the hooks on that page in position relevant to your content. Then you can pick the closest one and insert the html for the image into there.


  • bluesquirrel likes this

#3 mmunger

mmunger

    Advanced Member

  • Members

  • 34 posts
  • LocationMontréal
  • Framework Version:DMS 2
  • Country: Country Flag

Posted 18 January 2014 - 01:56 PM

Cool! Thank you!



#4 mmunger

mmunger

    Advanced Member

  • Members

  • 34 posts
  • LocationMontréal
  • Framework Version:DMS 2
  • Country: Country Flag

Posted 18 January 2014 - 02:37 PM

Hmmm. I tested it on my personal site and I get errors:

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mmunger/munger.ca/wp-content/plugins/pagelines-action-map/pagelines-action-map.php on line 61

 

Warning: Invalid argument supplied for foreach() in /home/mmunger/munger.ca/wp-content/plugins/pagelines-action-map/pagelines-action-map.php on line 63



#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 16247 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 January 2014 - 09:45 AM

I have to say I have never seen any blog or news site add a small icon or image after the last sentence. However, if the hook isn't doing it the way you would like, you would probably be best using custom CSS and one of the pseudo classes.

 

Please Login or Register to see this Hidden Content