Community Forums › Forums › Archived Forums › General Discussion › Displaying Meta Description in Archive page
- This topic has 8 replies, 2 voices, and was last updated 10 years, 3 months ago by Summer.
-
AuthorPosts
-
January 12, 2014 at 12:44 pm #84793MealtogMember
Is there a way to show the meta description beside each featured image in the archive page?
January 13, 2014 at 1:17 am #84923MealtogMemberBump, anyone have an idea on this?
January 13, 2014 at 12:00 pm #84988MealtogMemberOne more try. Anyone have an idea on how we can use functions.php to accomplish this?
January 13, 2014 at 7:11 pm #85092SummerMemberJust being my contrary self, but I'd want to put that sort of customization in archive.php instead of in functions.php. But that might just be me 🙂
That said, the only thing I was able to dig up were references to this function:
http://codex.wordpress.org/Function_Reference/wp_get_attachment_imageand mentions of wp_get_attachment_image_attributes filter, but I didn't find anything (yet) about what all the available attributes are (the page for it in the Codex filter reference doesn't exist yet)
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkJanuary 13, 2014 at 11:00 pm #85105MealtogMemberHoly summer, thanks for taking the time to pass the info along. I have been wondering about archive.php. It does not exist now but if it did, Genesis would just use this template for all archive pages correct? If so, where could I find a "default" template that will work with Genesis. Looked around and not many people tend to share their archive.php file.
January 14, 2014 at 12:01 am #85106SummerMemberYes, it would take over for all archives, or if you only wanted specific categories to use this, you'd create that template instead... see the Template Hierarchy for more details.
archive.php is no different from any other template, like home.php or category-{slug}.php... just put in there whatever you want.
Start a fresh blank one, and just throw the remove_action calls for getting rid of post info and post meta, then work your way through the other customizations you want from there 🙂
That said, I think that twentytwelve and twentyfourteen have archive templates, but you'd have to add your own Genesis calls.
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkJanuary 14, 2014 at 12:02 am #85107SummerMemberIt also looks like the free Novo child theme from ZigZag Press has an archive template.
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkJanuary 14, 2014 at 4:28 am #85119MealtogMemberHey thanks for the info and the tip. I quickly dropped Novo's archive.php into a workign website and got a blank body section. Only had divider lines for some reason. Looking at the code, maybe extra code needs to be added to functions.php you think?
January 14, 2014 at 11:49 am #85171SummerMemberYou have to put your action calls and functions in there, not just rely 100% on a template designed for a different theme... if you used the Novo archives as-is, without changing it for your site, then it's still relying on custom theme settings that do not exist in your theme.
Start with this:
<?php // Template Name: Custom Archives remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); genesis();
and put anything else you need before the genesis() call.
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After Dark -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.