How can I use get_post_meta with add_rewrite_rule to build custom permalinks?

Not sure the rewrite rule is good, but to answer the question about getting the post meta – you already have the post Object, so you don’t need to run a function to get the global $post, which might also fail or be wrong – you can simply use: $metaText = get_post_meta( $post->ID, ‘test_text_field’, true); … Read more

Why is page/2/ not working?

I would add this as a comment but cant right now. Im not seeing <?php get_search_form(); ?> Also, your code is not complete…you are showing a closing section tag but not the opening one. Also, you are searching page/2, this looks like a menu item. If this exact wording is not in the content area, … Read more

AddToAny shortcode in the loop

Alright, I got it. And it seems so obvious to me now, that I feel a little ashamed (I’m probably tired). I spent 2 days on this issue before realizing I made a big mistake. I used this jQuery to open the .sfr-share-box’ modal containing the share icons (with a full width overlay): $(‘.sfr-share’).on(‘click’, function() … Read more