Forum Replies Created
-
AuthorPosts
-
GabeVelezParticipant
The only difference was that there was a post ID issued to the small dialog div, so it was able to recognize on a per post basis. This added specificity in detecting the proper form. Ironically, one of the forms API calls is being rewritten at the very last minute on the merchant's end due to bugs, so I had to scrub the button for now. Again, thanks for your help - you really put me in the right direction!!!
GabeVelezParticipantHey Ren,
I really wanted to just say thanks - a friend of mine helped me out and came up with this solution:
add_filter( 'the_excerpt', 'my_custom_excerpt' ); function my_custom_excerpt( $output ) { global $post; ob_start(); include 'myscript.php'; $script_content = ob_get_contents(); ob_end_clean(); $custom_excerpt = ' <a href="#small-dialog-'.$post->ID.'" class="popup-with-zoom-anim"><div class="one-fourth buynowbtn">Buy Now</div></a> <div id="small-dialog-'.$post->ID.'" class="zoom-anim-dialog mfp-hide">' . $script_content . '</div> <a href="' . get_permalink( $post->ID ) . '"><div class="one-fourth readmorebtn">Read More</div></a> '; return $output . $custom_excerpt; }
This was the pop-up I was using: http://dimsemenov.com/plugins/magnific-popup/
I just wanted to share - thanks again for all your help!!!
GabeVelezParticipantI still don't have the answer, but here's a thought:
The form that's being output on these modals on the homepage are based on the FIRST post on the page. I had a plugin, Advanced Post Types Order, allowing my client to change around the order of these excerpts. Upon disabling it, the order completely changed, and the modal outputs a DIFFERENT form, because the FIRST post listed was different. Again, the same form on all the others.
My thoughts is that it is running on the first post ID it sees on the blog page and just does that one, rather than finding the post ID related directly to it...
Any thoughts?
Gabe
GabeVelezParticipantThanks Ren for your help - what's going on is that all of this came to me after the theme was built, so I just used custom fields to solve the problem rather than any custom post types. Though I'd clarify my frame of thought.
ticketCompany is a simple value they input to identify the company. For example, if this venue uses company #1 for their e-commerce, they would input the number 1. Number 2 for company #2. Else, it echos a message to call them for info. They are familiar with which company goes through which gateway.
The api calls pick up another custom field value, ticketID, which tells it which info to populate:
$eventapi_id = get_post_meta($post->ID,'ticketcodenumber', true);
This code as it stands above works perfectly on the posts. No issues there.
What I'm assuming it may be is that being that this modal is on every excerpt, it is just reading only the first it comes across an uses that one.
GabeVelezParticipantThis worked like a charm! thanks!!!
Now I got a new problem - my own "myscript.php" file is spitting out only the form of the first excerpt on the homepage on every buy now button lol:
<?php if (get_post_meta($post->ID,'ticketCompany', true) == 1) { // START: FIRST TICKET WIDGET --> include_once(get_stylesheet_directory() . "/first/api-call.php"); // END: FIRST TICKET WIDGET --> } else if (get_post_meta($post->ID,'ticketCompany', true) == 2) { // START: SECOND TICKET WIDGET --> include_once(get_stylesheet_directory() . "/second/api-call.php"); // END: ELECTROSTUB TICKET WIDGET --> } else { echo "Call for more info"; } ?>
Any help again is more than appreciated 🙂
Gabe
GabeVelezParticipantto clarify the code:
function excerpt_read_more_link($output) { global $post; return $output . '<a href="#small-dialog" class="popup-with-zoom-anim"><div class="one-fourth buynowbtn">Buy Now</div></a> <div id="small-dialog" class="zoom-anim-dialog mfp-hide"> <p>hey there - testing</p> </div> <a href="'. get_permalink($post->ID) . '"><div class="one-fourth readmorebtn">Read More</div></a>'; } add_filter('the_excerpt', 'excerpt_read_more_link');
GabeVelezParticipantThanks Dave, but I'm looking specifically for the function for the archive title so I can move it
Once I have that I'll be golden. Any ideas?
GabeVelezParticipantUpon immediately updating my client, djyoshi.com, to Genesis 1.9.1 the child theme style.css file wasn't being read!
In the html source it read "style.css?ver1.9.1" which doesn't exist.
I already rolled Genesis back to 1.8.2 to maintain the look of the site, but how do I correct this so I can properly update Genesis?
-
AuthorPosts