Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter quitmakingsense

    (@quitmakingsense)

    Thanks – don’t think I would have figured that out without your help or a code ref / codex for your plugin. Added a bit to allow qualification of the page and posting here in case someone else is trying to do this:

    <?php
        if (is_page( 'tcrp' ) ) {
            $pdb_record = Participants_Db::get_participant(filter_input(INPUT_GET, 'pdb'));
            $output = '<meta property="og:image" content="http://domain.com/wp-content/uploads/participants-database/' . $pdb_record['photo'] .'" />';
            echo $output;
        }
    ?>

    Of course, other fields can be pulled to build tags for og:title, og:description, etc.

    Thanks again for all your help.

    Thread Starter quitmakingsense

    (@quitmakingsense)

    I.e. – create pdb-single-meta.php with my code, then in the header:

    do_shortcode(‘[pdb_single template=”meta”]’)

    ?

    Thread Starter quitmakingsense

    (@quitmakingsense)

    That is what I was using it for, plugin output. Specifically, I want to create a meta tag in the page header that utilizes data from a single record when the URL contains a valid var (pdb=xxx).

    The code snippet I posted above was inserted in my pdb_single template, in addition to the code that was already there and as indicated it would or would not output depending upon whether it was placed before or after the ‘main’ code, and likewise the main code was affected by it’s position. I’m just feeling my way through this and trying to get some feedback here.

    Let’s refocus the discussion. Can you tell me how I would go about doing what I need to do, assuming it would be done? Perhaps I need to create a separate template just for my header code, then call in in the header.php for my site with do_shortcode() – does that sound like a viable approach? Just searching for some guidance.

    Thanks a bunch for all your help thusfar.

    Thread Starter quitmakingsense

    (@quitmakingsense)

    Ok, so I’ve learned one thing by doing some testing – created this basic loop:

    <?php while ( $this->have_groups() ) : $this->the_group(); ?>
    <?php while ( $this->have_fields() ) : $this->the_field(); ?>
    <?php echo ‘<!– foo –>’; ?>
    <?php endwhile; // end of the fields loop ?>
    <?php endwhile; // end of the groups loop ?>

    If I put this in my custom single template after the production code, it produces no output. If I move it to just before the production code, it outputs a bunch of <!– foo –> as expected, but the production code does not produce any output. Conclusion: I cannot loop through a single record more than once a single page without doing something special. Suggestions?

    Thanks!

    Thread Starter quitmakingsense

    (@quitmakingsense)

    I did check the php error log as well as the apache error log and there were no errors relating to the code, so it’s a head scratcher. Thanks anyway.

    Thread Starter quitmakingsense

    (@quitmakingsense)

    Did that, and it fixed the issue, but of course it does not explain why updraft was the only plugin having this problem. Marking as resolved…

    Thread Starter quitmakingsense

    (@quitmakingsense)

    Password reset email just tested: comes from wordpress@mydomain.com, as do emails from other plugins that generate them. Again, I did test that before I wrote this request. Whatever the logic should be, the fact is that only email generated by updraft is coming from ‘wordpress@’ with do domain. As such, my email program always treats it as spam. Do you have any suggestions on how to fix this? Uninstall and reinstall?

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