June 14, 2013 at 2:37 am #45826
Hi - 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?
ps: the sample tag URL included is still running on the old comicpress installationhttp://www.wonkie.com/tag/jacob-zuma/June 14, 2013 at 7:04 am #45863rfmeierMember
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 #46022
Hi 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 #46047
Simply add a conditional tag after the function in the above code snippet http://codex.wordpress.org/Conditional_Tags#A_Tag_Page
if (is_tag('yourtag') )
June 15, 2013 at 7:32 am #46066
Here'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 #46089rfmeierMemberJune 17, 2013 at 2:38 pm #46404
Thanks 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 #46406June 17, 2013 at 4:00 pm #46433
- The forum ‘General Discussion’ is closed to new topics and replies.