Tagged: Blog, single post
-
AuthorPosts
-
September 4, 2014 at 12:44 pm #313338
On a
singleEVERY blog post, I want to set up a default set of 5 images at the end of the post (and individually linked)… as a means of enhancing call to action after reading.
I have a mockup of what I mean. to illustrate … SEE MOCKUP.For information (if relevant) I am using blog setting as:_
BLOG STYLE: “Single author, small preview pic”
SINGLE POST STYLE: “Single post with big preview image”
RELATED ENTRIES: “Show thumbnails and display post title by tooltip”.Praying for some magical solution from your genius department :-)
Thanks.- This topic was modified 10 years, 2 months ago by Netzie. Reason: better explain reason and purpose
September 5, 2014 at 5:05 pm #314119Hi Peter!
You can use the 5 column shortcode and “Image” shortcode to create such an effect. I.e. I created this effect on my test server: http://test.inoplugs.com/bonjour-cest-lete/?lang=en
with following code:
[av_one_fifth first] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image] [/av_one_fifth] [av_one_fifth] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image] [/av_one_fifth] [av_one_fifth] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image] [/av_one_fifth] [av_one_fifth] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image] [/av_one_fifth] [av_one_fifth] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image] [/av_one_fifth]
You just need to replace http://kriesi.at/wp-content/themes/kriesi/images/logo.png with you image urls and replace http://test.com with your link urls.
Best regards,
PeterSeptember 5, 2014 at 6:10 pm #314148Hi Dude,
Super cool .. I will try that … But first! HOW DO I GET TO THE CODE?
When I click on “Default Editor” the page is BLANK – Click on Avia I see the builder?September 6, 2014 at 4:46 am #314336Hi!
Create a temporary post or page to generate the shortcode using the Shortcode Wand on the Default Editor toolbar.
Regards,
IsmaelSeptember 9, 2014 at 5:33 pm #316005Hi Ismael,
I now have build the AV-Code blocks… Where do I stick it to have it show up after every blog post (where do I find the template setup)?
Cool trick… (Why can’t it be a bit easier that the design we can make in the AVIA drag&Drop can be seen in the default?)
CheersPeter
- This reply was modified 10 years, 2 months ago by Netzie.
September 12, 2014 at 7:23 am #317892Hey Peter!
You can enable debug mode, that way you’d be able to see all the codes the layout builder generates.
Regards,
JosueSeptember 15, 2014 at 2:34 pm #319201Hi!
I have the code… That generates the 5 images that I want to stick after each post. My “Call to Action”… But where do I stick this code?
What file …? Single.php? and where… to make sure the Enfold shortcodes renders alright?September 15, 2014 at 6:00 pm #319329Hey!
Try adding this at the very end of your theme functions.php file:
add_action('ava_after_content', 'add_five_images', 10, 2); function add_five_images($id = "", $context = "") { if($context == "post"){ do_shortcode("[av_one_fifth first] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image] [/av_one_fifth] [av_one_fifth][av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image] [/av_one_fifth][av_one_fifth] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image][/av_one_fifth] [av_one_fifth] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image][/av_one_fifth] [av_one_fifth] [av_image src='http://kriesi.at/wp-content/themes/kriesi/images/logo.png' attachment='' attachment_size='full' align='center' animation='no-animation' link='manually,http://test.com' target='' styling='' caption='' font_size='' appearance=''][/av_image][/av_one_fifth]"); } }
Cheers!
JosueSeptember 15, 2014 at 8:14 pm #319388Hi Josue,
Added – But nothing shows?
Cheers
Peter
September 19, 2014 at 2:01 pm #321887BING & BONK!!
September 19, 2014 at 5:24 pm #322000Hey!
Try with this:
add_action('ava_after_content', 'add_five_images', 10, 2); function add_five_images($id = "", $context = "") { if($context == "post"){ echo do_shortcode("[PUT FIVE SHORTCODES SHORTCODES HERE]"); } }
Regards,
JosueSeptember 20, 2014 at 1:19 pm #322334Hi Josue,
That worked… Now they show… However!
1: The five promotions pictures shows on on BLOG page after each excerpts see http://www.henningdaverne.dk/blog2: On the single post (each blog post) the five promotion pictures show up – but they are ontop – covering the “SHARE” buttons?
Could you help me to fix this?
http://www.henningdaverne.dk/yin-og-yang-oest-og-vest-uddrag-fra-bogen-meditation-og-mindfulness/Cheers
Peter
September 20, 2014 at 1:22 pm #322336Hi Peter!
Use this instead:
add_action('ava_after_content', 'add_five_images', 10, 2); function add_five_images($id = "", $context = "") { if(is_single() || $context == "post"){ echo do_shortcode("[PUT FIVE SHORTCODES SHORTCODES HERE]"); } }
And add this to Quick CSS:
.single-post .entry-footer .flex_column { margin-top: 75px; }
Cheers!
JosueSeptember 20, 2014 at 1:35 pm #322342Hi Josue,
Magic… :) You are the man!!
Do you also have a fix for them NOT to show up right after the excerpts on the blog page?September 20, 2014 at 1:37 pm #322343Did you try changing the code in functions.php? try with this:
add_action('ava_after_content', 'add_five_images', 10, 2); function add_five_images($id = "", $context = "") { if(is_singular('post') && $context == "post"){ echo do_shortcode("[PUT FIVE SHORTCODES SHORTCODES HERE]"); } }
Cheers!
JosueSeptember 22, 2014 at 1:10 pm #322967Magic…. Pure magic!! That worked (did I miss a step)… Anyway!
I am well happy.. Thanks!! -
AuthorPosts
- The topic ‘Single blog post – bottom, set default call to action images’ is closed to new replies.