WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Add custom field reflect in snippet preview? (14 posts)

  1. Agnes
    Member
    Posted 3 years ago #

    Hi

    I have a custom field "subtitle" and have managed to insert it in the admin of SEO plugin, so i could actually have my metadescription look like:
    %%subtitle%% - %%excerpt%%

    However, I was unable to find out where to add code in the plugin file, so that this would be reflected ion the admin pages preview snippet. Any idea?

    Thanks
    Agnes

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Jack
    Member
    Posted 2 years ago #

    I would like to know this as well :)

  3. lucrothe
    Member
    Posted 2 years ago #

    Any luck figuring this out? I would also like to use my own custom fields.

  4. Agnes
    Member
    Posted 2 years ago #

    Nop.. i have not found out.
    I could only insert it into the defaults, but not in the preview. If we are more asking for it... may be the real masters of the code will answer?

  5. spicydesign
    Member
    Posted 2 years ago #

    %%cf_<field name>%%

  6. Agnes
    Member
    Posted 2 years ago #

    Hi Spicy! Thanks for ther hint
    But the big question for me was / is also in where (of the plugin file) to exacly intervene, so that the additional field shows on the admin pages preview snippet?
    Would be glad to know

  7. spicydesign
    Member
    Posted 2 years ago #

    You don't need to edit anything in the plugin files to display this in the snippet preview. you just need to configure the titles in the plugin here yourdomainname.com/wp-admin/admin.php?page=wpseo_titles
    and the info here will be automatically displayed in the snippet section.

  8. Agnes
    Member
    Posted 2 years ago #

    I don't get it...
    If I ust add cf_%%subtitle%% in my titles setting page for posts let us say, unfortunately they don't render in the titles!

    I had added %%subtitle%% and how to get this value in class-config.php and wpseo-functions.php. It does render then in my metas, but I can't get it to show in the snippet preview in admin!

  9. Agnes
    Member
    Posted 2 years ago #

    Oh, actually, it works now
    So what I did is:
    - added %%subtitle%% in class-config.php (just for info for users)
    - added it and how to get it in wpseo-functions.php

  10. Agnes
    Member
    Posted 2 years ago #

    mmm... no, actually it does not show in the preview...
    In fact, they show for the title, but not for the description.

  11. Agnes
    Member
    Posted 2 years ago #

  12. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Well you're editing the plugin as you said above, so I can't really help you.

  13. Agnes
    Member
    Posted 2 years ago #

    ok....

    If I knew for sure how to achieve the result without editing, that would be fine!

    - so custom fields can be added with %%cf_<field name>%%
    (would be nice to add that vinfo on bottom of the admin page fpor titles)

    - any chance for custom taxonomies?

    Thanks, Agnes

  14. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    - Will add that to admin page indeed.
    - Yes, but not soon...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic