• Resolved danielcob

    (@daniel05wp)


    Hey guys!

    I’m currently using this to show the meta-description in my search results if someone uses my internal search.

    <?php
    // Page query
    $query = [
    ‘id’ => get_the_id(),
    ];

    $meta_description = function_exists( ‘the_seo_framework’ ) ? the_seo_framework()->get_description( $query ) : ”;

    echo esc_html( $meta_description );

    ?>

    Now I wanna echo the meta-title from TSF too and put it above the meta-description.

    What would I add to the code to make that work?

    And is there a general overview of all TSF fields and its PHP “names”? ??

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi Daniel,

    You can use the_seo_framework()->get_title( $query ); to get the title.

    Most of the documentation you can find about the plugin is within the plugin files. The methods are completely documented and mostly manifest. You only need a neat code editor like VSCode that’ll help you browse through it easily. Most of what TSF is capable of is instantiated within this file.

    Thread Starter danielcob

    (@daniel05wp)

    Thank you very much, Sybre! You are such a helpful person!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Echo (PHP) Meta-Title’ is closed to new replies.