We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • in reply to: Shortcode for Pods Taxonomies? #15818
    Bodie J
    Participant

    Sorry for the dual post, I realized that was able to answer some of my own questions (Elements, hello?)

    I am still not able to get it to work, but maybe I am going about it all wrong?

    Here is a screenshot of my settings.

    1) Created a GP Hook Element
    2) Put the provided code in and tweaked it to show the appropriate list and taxonomy
    3) Configured all the settings for the WPSP list as well as the GP Element to show up in Timeline Entries.

    I am still not able to see anything show up in my post, but I know we are getting closer!

    Sorry to keep at this, but this is such a key feature for me. Once I figure this out, it will save me buckets of time in future timeline entries.

    Thanks!

    in reply to: Shortcode for Pods Taxonomies? #15801
    Bodie J
    Participant

    This is great! A couple follow-up questions:

    1) Where would you recommend this code go so as to show up after the content in my timeline_event post type single posts?
    2) Do I need a GeneratePress hook as well? If so, I would need help writing that function
    3) What would be the best way to do this multiple times on the same page? Since I have both the timeline_tag and the timeline_category posts that I want to render out, is there a way to hook them both into the post after the content?

    I wish I was better at PHP for moments like these.

    Thanks Tom

    in reply to: Shortcode for Pods Taxonomies? #15754
    Bodie J
    Participant

    I currently have two GenerateBlocks containers at the bottom of my timeline_event single post layout. Each container block has a Headline block inside that contains the WPSP shortcodes.

    So guess I could just create a timeline-event-single.php file and you could help with a function that hooks in after the regular post content? Oh man, if I could do that and have them automatically generate, I would be thrilled. I LOVE the Cards look and want to have them at the bottom of all my timeline events for easy linking to other posts that share those taxonomies.

    It’s broken right now, but as far as content and layout goes, here is the idea: https://bodiequirk.com/timeline-event/easter-2020/

    Here are the blocks

    Thanks for your help!

    in reply to: Shortcode for Pods Taxonomies? #15739
    Bodie J
    Participant

    Hey Tom,

    Thanks for the response. I have designated the timeline_category and timeline_tag taxonomies to only show up on the timeline-event post type in the Pods settings. So by checking a particular box in the settings, would that count as setting the tax_term setting? Like my selecting the April timeline category and 2020 as the timeline tag in the image below?

    Timeline Settings Image

    I would love to add the list dynamically! How do I do that? Being able to do that would negate my need for shortcode adjustment every time. I am always going to want to link content that the current post itself contains such as the timeline_category or timeline_tag to other posts with the same settings.

    And to answer your question about the categories, no, I just realized that I don’t think I have have posts published with those tags, so that makes sense.

    in reply to: Possible to Filter by a Category AND a Tag? #14947
    Bodie J
    Participant

    My laptop tries so hard to be helpful, but shortcake is just so far from shortcode.

    in reply to: Possible to Filter by a Category AND a Tag? #14945
    Bodie J
    Participant

    I was overthinking it. I just set one of the Taxonomies in the Dashboard settings and used the other in the shortcake. Works great!

    Thanks again!

    B

    in reply to: Possible to Filter by a Category AND a Tag? #14937
    Bodie J
    Participant

    Thanks so much Tom!

    Is there anything I should set or not set within the WPSP Options so as not to conflict here? Do I choose anything under the Taxonomy setting or do I leave it blank?

    Bodie J
    Participant

    Ok here we go:

    This was above the “THIS WEEK” Section on the homepage: https://hcf.cc/#this-week

    array(6) { ["order"]=> string(3) "asc" ["orderby"]=> string(10) "start_date" ["post_type"]=> string(12) "tribe_events" ["posts_per_page"]=> int(8) ["post_status"]=> array(1) { [0]=> string(7) "publish" } ["tax_query"]=> array(1) { [0]=> array(4) { ["taxonomy"]=> string(8) "post_tag" ["field"]=> string(4) "slug" ["terms"]=> array(1) { [0]=> string(9) "this-week" } ["operator"]=> string(2) "IN" } } }

    and this was on the Online Services Page: https://hcf.cc/services/

    array(7) { ["order"]=> string(3) "asc" ["orderby"]=> string(10) "start_date" ["post_type"]=> string(12) "tribe_events" ["posts_per_page"]=> int(10) ["paged"]=> int(0) ["post_status"]=> array(1) { [0]=> string(7) "publish" } ["tax_query"]=> array(1) { [0]=> array(4) { ["taxonomy"]=> string(8) "post_tag" ["field"]=> string(4) "slug" ["terms"]=> array(1) { [0]=> string(15) "online-services" } ["operator"]=> string(2) "IN" } } }

    I left them on the page for now if you want to see.

    Thanks

    Bodie J
    Participant

    Tom,

    Thanks for the reply, but for some reason it doesn’t seem to work. Is there any particular settings I should set in the “More Settings” section?

    I am trying to go for the same effect on both of these pages.

    https://hcf.cc/#this-week
    https://hcf.cc/services/

    I simply want to organize them chronologically with the next one coming up be the first one in the list. Your shortcode adjustment should work but it doesn’t seem to? I wrote the date in the title so it is easier to see what day they occur on. For whatever reason, they don’t seem to be ordering by start_date.

    What else should I try?

    Appreciate your help, as always.

    Bodie

    in reply to: Displaying Sermon Manager meta in WP Show Posts? #13881
    Bodie J
    Participant

    Nevermind, I got it!! Thanks so much Tom. I didn’t realize that code was ready to go, I at first glance thought I had to write a function name, but no! function() was to be left as is. This is so great, thanks again.

    add_action( 'wpsp_after_content', function() {
        ?>
            <div class="wpfc-sermon-footer">
    				<?php if ( has_term( '', 'wpfc_preacher', $post->ID ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-preacher">
    						<?php
    						echo apply_filters( 'sermon-images-list-the-terms', '', // phpcs:ignore
    							array(
    								'taxonomy'     => 'wpfc_preacher',
    								'after'        => '',
    								'after_image'  => '',
    								'before'       => '',
    								'before_image' => '',
    							)
    						);
    						?>
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo sm_get_taxonomy_field( 'wpfc_preacher', 'singular_name' ); ?>
    							:</span>
    						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_preacher' ); ?></span>
    					</div>
    				<?php endif; ?>
    				<?php if ( get_post_meta( $post->ID, 'bible_passage', true ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-passage">
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo __( 'Passage', 'sermon-manager-for-wordpress' ); ?>:</span>
    						<span class="wpfc-sermon-meta-text"><?php wpfc_sermon_meta( 'bible_passage' ); ?></span>
    					</div>
    				<?php endif; ?>
    				<?php if ( has_term( '', 'wpfc_service_type', $post->ID ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-service">
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo sm_get_taxonomy_field( 'wpfc_service_type', 'singular_name' ); ?>:</span>
    						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_service_type' ); ?></span>
    					</div>
    				<?php endif; ?>
    			</div>
        <?php
    } );
    in reply to: Displaying Sermon Manager meta in WP Show Posts? #13879
    Bodie J
    Participant

    Oh, ok! Thanks for the response, Tom.

    So is the reason the code above doesn’t work because the <div class="wpfc-sermon-footer"> that begins and ends the code block is outside of the PHP tags?

    in reply to: Displaying Sermon Manager meta in WP Show Posts? #13836
    Bodie J
    Participant

    Oh wow, this definitely doesn’t work! Ha ha. I remembered the cardinal rule: NO HTML inside PHP. I definitely can replicate patterns if I can get one meta term to work. Thanks for any direction!

    in reply to: Displaying Sermon Manager meta in WP Show Posts? #13832
    Bodie J
    Participant

    Great, Thanks Tom!

    Ok I found the code from the Sermon Manager plugin that I want to add into WPSP. Do I need all of this? It is a footer info so I was thinking of adding it into wpsp_after_content Is there anything you would do to modify it to work correctly?

    			<div class="wpfc-sermon-footer">
    				<?php if ( has_term( '', 'wpfc_preacher', $post->ID ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-preacher">
    						<?php
    						echo apply_filters( 'sermon-images-list-the-terms', '', // phpcs:ignore
    							array(
    								'taxonomy'     => 'wpfc_preacher',
    								'after'        => '',
    								'after_image'  => '',
    								'before'       => '',
    								'before_image' => '',
    							)
    						);
    						?>
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo sm_get_taxonomy_field( 'wpfc_preacher', 'singular_name' ); ?>
    							:</span>
    						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_preacher' ); ?></span>
    					</div>
    				<?php endif; ?>
    				<?php if ( get_post_meta( $post->ID, 'bible_passage', true ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-passage">
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo __( 'Passage', 'sermon-manager-for-wordpress' ); ?>:</span>
    						<span class="wpfc-sermon-meta-text"><?php wpfc_sermon_meta( 'bible_passage' ); ?></span>
    					</div>
    				<?php endif; ?>
    				<?php if ( has_term( '', 'wpfc_service_type', $post->ID ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-service">
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo sm_get_taxonomy_field( 'wpfc_service_type', 'singular_name' ); ?>:</span>
    						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_service_type' ); ?></span>
    					</div>
    				<?php endif; ?>
    			</div>

    Would you be able to show me an example of how to properly add this into WPSP? The code from the previous post was

    add_action( 'wpsp_before_content','wpsp_add_custom_meta' );
    function wpsp_add_custom_meta()
    {
        $meta = get_post_meta( get_the_ID(), '_your_custom_meta_key', true );
        if ( isset( $meta ) && '' !== $meta )
            echo $meta;
    }

    So would it look like:

    add_action( 'wpsp_after_content','wpsp_add_sermon_manager_meta' );
    function wpsp_add_sermon_manager_meta()
    {
    <div class="wpfc-sermon-footer">
    				<?php if ( has_term( '', 'wpfc_preacher', $post->ID ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-preacher">
    						<?php
    						echo apply_filters( 'sermon-images-list-the-terms', '', // phpcs:ignore
    							array(
    								'taxonomy'     => 'wpfc_preacher',
    								'after'        => '',
    								'after_image'  => '',
    								'before'       => '',
    								'before_image' => '',
    							)
    						);
    						?>
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo sm_get_taxonomy_field( 'wpfc_preacher', 'singular_name' ); ?>
    							:</span>
    						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_preacher' ); ?></span>
    					</div>
    				<?php endif; ?>
    				<?php if ( get_post_meta( $post->ID, 'bible_passage', true ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-passage">
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo __( 'Passage', 'sermon-manager-for-wordpress' ); ?>:</span>
    						<span class="wpfc-sermon-meta-text"><?php wpfc_sermon_meta( 'bible_passage' ); ?></span>
    					</div>
    				<?php endif; ?>
    				<?php if ( has_term( '', 'wpfc_service_type', $post->ID ) ) : ?>
    					<div class="wpfc-sermon-meta-item wpfc-sermon-meta-service">
    						<span class="wpfc-sermon-meta-prefix">
    							<?php echo sm_get_taxonomy_field( 'wpfc_service_type', 'singular_name' ); ?>:</span>
    						<span class="wpfc-sermon-meta-text"><?php the_terms( $post->ID, 'wpfc_service_type' ); ?></span>
    					</div>
    				<?php endif; ?>
    			</div>
    }

    Love to know your thoughts!

    Thanks

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