wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Author custom fields not working

Open derekashauer opened this issue 12 years ago • 2 comments

Version 1.5.2.5

On the author page, trying to use custom fields - they are not being translated, just shows the %%cf_city%% in the tag.</p> <p>My settings for author archives: %%name%% - %%cf_city%%, %%cf_state%%</p> <p>I used the following:</p> <p>var_dump(get_user_meta($user->ID));</p> <p>This displays, as part of a larger array since we store tons of author custom fields:</p> <p>["city"]=> array(1) { [0]=> string(10) "South Park" } ["state"]=> array(1) { [0]=> string(8) "Colorado" }</p> <p>So the values are there in the database</p> </p> <div class="body-meta"> <div class="owner-info float-right"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/1054431?v=4" alt="derekashauer avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <span class="w3-opacity w3-small"> Apr 04 '14 04:04 </span> <a class="owner-name" href="http://gitmemories.com/derekashauer"> derekashauer </a> </div> <div class="clear-both"></div> </div> <div class="clear-both"></div> </div> <div class="issue-body"> <p> <p>I went poking around the "wpseo_replace_vars" function. There is only one mention of replacing %%cf_<field_value>%% values and it happens only on single posts. I then added a custom field tag to my post title template and that did work just fine.</p> <p>So appears that just author user meta is not being replaced.</p> </p> <div class="body-meta"> <div class="owner-info float-right"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/1054431?v=4" alt="derekashauer avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <span class="w3-opacity w3-small"> Apr 04 '14 04:04 </span> <a class="owner-name" href="http://gitmemories.com/derekashauer"> derekashauer </a> </div> </div> <div class="clear-both"></div> </div> <div class="issue-body"> <p> <p>This was fixed in our recent work on the replace vars functionality. If it's still an issue, please reopen with examples.</p> </p> <div class="body-meta"> <div class="owner-info float-right"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/487629?v=4" alt="jdevalk avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <span class="w3-opacity w3-small"> Aug 15 '14 11:08 </span> <a class="owner-name" href="http://gitmemories.com/jdevalk"> jdevalk </a> </div> </div> <div class="clear-both"></div> </div> </section> </div> </div> </div> <aside class="detail-info-box"> <h3 class="title pkg-infobox-metadata">Labels</h3> <script type="text/javascript"> atOptions = { 'key' : '6ca19c2b16e3f20a28885886ef99a68e', 'format' : 'iframe', 'height' : 250, 'width' : 300, 'params' : {} }; </script> <script type="text/javascript" src="https://www.highperformanceformat.com/6ca19c2b16e3f20a28885886ef99a68e/invoke.js" ></script> <h3 class="title">Owner</h3> <div class="owner-info flex-items-center d-flex"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/1054431?v=4" alt="derekashauer avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <a class="owner-name" href="http://gitmemories.com/derekashauer"> derekashauer </a> </div> <hr class="color1"> <h3>Other Repo Issues</h3> <div class="packages"> </div> <div style="clear: both"></div> </aside> </div> </div> </main> <footer class="site-footer"> <span>© 2022 Git Memory </span> <a class="link sep" href="http://gitmemories.com/privacy-policy">Policy</a> <a class="link sep" href="http://gitmemories.com/terms">Terms </a> <a class="link sep" href="http://gitmemories.com/contact">Contact </a> <a class="link sep" href="https://exchangetuts.com">Exchangetuts </a> <a class="link sep" href="https://onltools.com/">Onltools </a> <a class="link sep" href="https://serveraide.com/">Serveraide </a> </footer> <script src="http://gitmemories.com/js/app.js?id=a1337f444c840fae34ad"></script> </body> </html>