How can I call the title and description function for a custom theme

#358268
  • Resolved CarlosRamos
    Rank Math free

    Hi, I need your help. I want to call a title and description function in php for a custom theme. I appreciate it.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    There are usually two ways in which you can fetch the title. Either pull it from the database of fetch it dynamically. The dynamic processing feature is great because it allows the content to be maintained once and used severally.

    Stored in Database: <p><?php echo get_post_meta($post->ID, 'rank_math_title', true); ?></p>

    Dynamic Processing: <p><?php echo RankMath\Post::get_meta( 'title', $post->ID ); ?></p>

    <p><?php echo RankMath\Post::get_meta( 'description', $post->ID ); ?></p>

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘How can I call the title and description function for a custom theme’ is closed to new replies.