Tagged: x
-
AuthorPosts
-
June 26, 2016 at 5:38 pm #1060465
eimkeithParticipantHey guys, I’m closing in on resolving my website functionality and need to set up some subscribe forms for RSS updates on specific post tags.
I’ve set up a mailchimp account and am trying to figure out how to put an opt-in/subscribe link on some of the post tag archive pages. Putting shortcode in Archive subtitle doesn’t seem to work as I’d’ve expected: https://www.zuffenhaus.us/tag/mary-stuart-rsr/
Ideas? Advice? Better approach for same function?
Thanks In Advance guys.
June 26, 2016 at 9:03 pm #1060729
LelyModeratorHi There,
Thanks for posting in. Please note that shortcode is not support in Archive subtitle field. Please add this instead on your child theme’ functions.php file.
add_action('x_after_view_integrity__landmark-header', 'custom_form_below_archive'); function custom_form_below_archive () { if ( is_tag('tag-mary-stuart-rsr') ) { echo do_shortcode('[x_subscribe form="2381"]'); } }Hope this helps.
June 27, 2016 at 5:42 am #1061261
eimkeithParticipantOK, great, I’ll try that; but is there a way to activate shortcodes in the Archive subtitle fields generally? So that this specific coding doesn’t have to occur each time we add a tag archive subscription?
Alternatively, would shortcodes work in the Archive description field?
June 27, 2016 at 6:46 am #1061339
ChristopherModeratorHey there,
Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.
Thank you for your understanding.
June 27, 2016 at 6:55 am #1061345
eimkeithParticipantso just to clarify the second part of the inquiry, is it not possible to activate the description field of the archive; and if it were, would shortcodes be usable there?
Just clarifying so as to properly direct any custom development.
June 27, 2016 at 8:01 am #1061414
ChristopherModeratorHi there,
We could help you to display category description, your question was about adding shortcodes in description field which I said it’s only possible with custom development.
Copy _landmark-header.php from framework/views/integrity and put it in the same path inside child theme, replace existing code with following :
<?php // ============================================================================= // VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP // ----------------------------------------------------------------------------- // Handles content output of large headers for key pages such as the blog or // search results. // ============================================================================= $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true ); $disable_filters = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true ); ?> <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable' ) == '1' ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> </header> <?php elseif ( is_search() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>“'; the_search_query(); echo '”</strong>'; ?></span></p> </header> <?php elseif ( is_category() || x_is_portfolio_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> <?php echo category_description(); ?> </header> <?php elseif ( x_is_product_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> </header> <?php elseif ( x_is_portfolio_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( is_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> <?php echo tag_description(); ?> </header> <?php elseif ( x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( is_404() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p> </header> <?php elseif ( is_year() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_month() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_day() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( x_is_portfolio() ) : ?> <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?> <header class="x-header-landmark x-container max width"> <?php if ( $disable_page_title != 'on' ) : ?> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> <?php endif; ?> <?php x_portfolio_filters(); ?> </header> <?php endif; ?> <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable' ) == '1' ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p> </header> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p> </header> <?php endif; ?> <?php endif; ?>Hope it helps.
June 27, 2016 at 8:18 am #1061437
eimkeithParticipantThanks! It looks like I can a least put links in the description field, so that’s a start!
June 27, 2016 at 8:34 am #1061478
eimkeithParticipantOK, so back to this previous code in functions.php:
add_action(‘x_after_view_integrity__landmark-header’, ‘custom_form_below_archive’);
function custom_form_below_archive () {
if ( is_tag(‘tag-mary-stuart-rsr’) ) {
echo do_shortcode(‘[x_subscribe form=”2381″]’);
}
}what should do (please excuse the ignorance, still learning here) – enable that particular shortcode?
what should I be seeing after adding that to my child theme?June 27, 2016 at 8:47 am #1061503
ChristopherModeratorHi there,
Please provide us with login credentials so we can take a closer look.
Thanks.
June 27, 2016 at 8:58 am #1061526
eimkeithParticipantcertainly – what exactly do you need? wp-admin stuff?
June 27, 2016 at 9:52 am #1061624
eimkeithParticipantI suppose I can’t run mailchimp scripts on archive pages either?
for example: <script type=”text/javascript” src=”//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js” data-dojo-config=”usePlainJson: true, isDebug: false”></script><script type=”text/javascript”>require([“mojo/signup-forms/Loader”], function(L) { L.start({“baseUrl”:”mc.us13.list-manage.com”,”uuid”:”4346cb5ccef140ca9216d8695″,”lid”:”62a68f9e00″}) })</script>
would work for my purposes, if I could implement it on https://www.zuffenhaus.us/tag/mary-stuart-rsr/
June 27, 2016 at 7:30 pm #1062384
LelyModeratorHi There,
The previous code should display the form this tag page:https://www.zuffenhaus.us/tag/mary-stuart-rsr/ below the Archive Subtitle.
Scripts should also be added using a child theme like below:
function third_party_mailchimp_code() { ?> <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us13.list-manage.com","uuid":"4346cb5ccef140ca9216d8695","lid":"62a68f9e00"}) })</script> <?php } add_action( 'wp_footer', 'third_party_mailchimp_code' );Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1060465 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
