Community Forums › Forums › Archived Forums › General Discussion › Tag Archive Page – Customisation Help needed please
Tagged: customisation, tag archive page
- This topic has 8 replies, 3 voices, and was last updated 9 years, 11 months ago by
netyourcatch.
-
AuthorPosts
-
June 14, 2013 at 2:37 am #45826
netyourcatch
MemberHi - I'm in the process of migrating from a ComicPress installation to a custom child Genesis theme and I have a couple of questions I need help with please:
1. I am using Yoast's WordPress SEO which allows me globally set title (and h1 tag) of the tag page. For the tag archive intro, however, I am using a custom PHP script on my current ComicPress installation that automatically generates some archive intro text. This script includes the title of the first post in that tag archive. How do I incorporate such a script so that if there is no entry in the Genesis Tag Archive Intro box, then it will run the script. What variable do I use in that script that will enable me to display the title of the first post in that archive?
2. I would like to process some PHP script at the bottom of each tag archive page right before the numeric pagination links displays. Please can you let me know how best to do this?
Thanks!
ps: the sample tag URL included is still running on the old comicpress installation
http://www.wonkie.com/tag/jacob-zuma/June 14, 2013 at 7:04 am #45863rfmeier
MemberHello,
Genesis has support for Yaost's SEO out of the box. You will be able to keep using it if you like without having to modify code. How are you executing the current custom script? Are you using an action callback?
For questions #2, here is an example for displaying custom content before the navigation;
This can also be done with the Genesis Simple Hooks plugin.
I hope this helps.
June 14, 2013 at 11:58 pm #46022netyourcatch
MemberHi there... thanks so much for the reply.
Currently the script is coded into a custom version of the archive page (it's a Comicpress theme WordPress installation so no hooks etc there). It appears right after the archive page title is displayed and before the loop begins.
I'm using Genesis Simple Hooks too but I'm not sure which hook to use as it seems all the hooks apply to posts and pages, not to archive pages. Will the code you provided above work on all pages or just the archive pages? (I require both the solutions only to run only on the tag archive page of the theme... not sure how to work that into the code above)
Thanks again for helping out!
June 15, 2013 at 5:57 am #46047Brad Dalton
ParticipantSimply add a conditional tag after the function in the above code snippet http://codex.wordpress.org/Conditional_Tags#A_Tag_Page
Example:
if (is_tag('yourtag') )
June 15, 2013 at 7:32 am #46066Brad Dalton
ParticipantHere's a code snippet which you can modify http://www.studiopress.community/topic/automatic-cta-snippet-at-bottom-of-post/page/2/#post-46055
June 15, 2013 at 9:05 am #46089rfmeier
MemberThanks Brad,
I just added your thread as a favorite to reference others to. Good work.
June 17, 2013 at 2:38 pm #46404netyourcatch
MemberThanks much for your help!
@braddalton - Is there a conditional I could use for all tag pages (not just one specific one)?Also, I am trying to get a specific menu I've created displayed on this custom archive page. I'm a bit stuck on how to select that menu (e.g. I have created menu1, menu2, menu3, etc on the Appearance > Menus page and I would like to have menu3 display as the secondary nav menu on this page only) - any suggestions as to how to do this please?
Thank you again 🙂
June 17, 2013 at 2:52 pm #46406Brad Dalton
ParticipantThanks Ryan.
Yes @netyourcatch
if (has_tag() ) {
Please start a new thread for the second question and i'll give you the code.
June 17, 2013 at 4:00 pm #46433netyourcatch
Member -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.