Archive Text Intro issue

Community Forums Forums General Discussion Archive Text Intro issue

This topic is: resolved

This topic contains 6 replies, has 2 voices, and was last updated by  chrisman 1 year, 1 month ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #52229

    chrisman
    Participant
    Post count: 12

    I’m using the News theme with Genesis. I have one category in which I have used the Archive Intro Text option to show some unique information at the top of the first page of that category;
    http://www.behindthemixer.com/content/category/church_audio_101

    At one point, in my Archive Intro Text, I need to use a shortcode to add a plugin-generated form. As it appears, there is no way to use shortcodes in Archive Intro Text. I looked into add_filter / do_shortcodes and it does appear to be possible if I had this information in the category description..but then it would appear on EVERY page, not just the first page of the category.

    I looked in the News Child Theme for category.php so I could customize it for a specific category but it appears that News doesn’t have one. So, then it comes to creating a custom one and the stuff I’m finding on Google is more about creating a completely different category.php page. I want a category page template just like what is normally produced (blog title, thumbnail, excerpt, etc) but where i can customize the header. I can’t figure out what genesis file to use as a basis. The archive page looks like the generic single line archive which I don’t want. I’m stumped.

    One last note, I do have php code I can use for the plugin-created form (newsletter form) but archive intro text appears to strip out the php tag stuff. :(

    • This topic was modified 1 year, 1 month ago by  chrisman.
    • This topic was modified 1 year, 1 month ago by  chrisman.
    http://www.behindthemixer.com/content/category/church_audio_101
    #52301

    braddalton
    Participant
    Post count: 9737

    Sorry, what was your question?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #52304

    chrisman
    Participant
    Post count: 12

    Brad, I’m trying to use a shortcode in the Archive Intro Text field for a category. In a post I read from you, you mentioned (confirmed) that that particular field doesn’t accept shortcodes. I have a wordpress plugin that creates my newsletter forms which I use via shortcode. Therefore, for me to get the newsletter form to appear before only one specific category, I can’t use the Archive Intro Text.

    This means I have to create a category template. I want everything to appear like the normal category listing except, for this category, the intro text plus a form should be displayed on the first page of the category.

    As this point, i have created a category-[slug].php file.

    <?php /*
    Template Name: category-church_audio_101
    */ 
    
    add_action('genesis_before_content', 'custom_church_audio_101');
    
    function custom_church_audio_101() {
    	if ($paged < 2 )
    	{
    	echo "[unique category intro text / form here]"
            }
    }
    
    genesis(); 
    
    ?> 

    But don’t I need to have all of the loop code in there somewhere?

    #52317

    braddalton
    Participant
    Post count: 9737

    I think i did update that post with a solution which is why i’m interested in your question.

    Let me test this locally and see if i can help you.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #52319

    braddalton
    Participant
    Post count: 9737

    This code will execute the contact form shortcode and display the form immediately above the intro text using the web-design category slug

    https://gist.github.com/braddalton/6074297


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #52320

    braddalton
    Participant
    Post count: 9737

    Another way to do this is to use a custom field.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #52457

    chrisman
    Participant
    Post count: 12

    Great! I’m testing it out and it’s really close to what I need. I’m sure i can get it from here. thanks!

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Archive Text Intro issue’ is closed to new replies.