seo – Meta name description in og: description

I would like to ask if there is a difference when I have the description and og: description separately and together. Is there only one difference: when I separate it separately, can I add a different text and when it is together, the same text is used for both?




Together


8 – Meta dynamic tags and description in custom pages

I have a custom drupal module that will generate pages for the players of my site. The player's statistical data is expected to be updated most of the time. Therefore, for ease of use, I have created a custom module for the reader pages.

I have an external database where all the information of my players is stored. My module will define a URL pattern and, once obtained, will display player information from the external database.

My problem is, since there is no real node present for my pages, I have not been able to display the meta tags and the description of my reader pages. I've tried the meta tag module and the meta tag routing modules. But by using these modules, I could only define a static meta tag and a description for my entire module, which means that there is only one. Only one meta description for all pages. I want them to be dynamic and that they vary from one page to the other. I've tried the examples provided below, but I can only add static strings. I want the meta wise description of the player.

Generate meta in the Drupal 8 controller

Add a meta tag to the Drupal 8 head

Here is the structure of my code.

player.info.yml

name: Player Module
description: Creates Page for Player.
package: Custom
type: module
version: 1.0
core: 8.x

joueur.module

 array(
      'variables' => array('result' => NULL),
      'template' => 'player-page-formatter'
    ),
  );
}

player.routing.yml

player:
  path: '/player/{player}'
  defaults:
    _controller: 'DrupalplayerControllerPlayerController::content'
    _title_callback: 'DrupalplayerControllerPlayerController::title' 
  requirements:
    _permission: 'access content'

PlayerController.php

 'player_page_data',
      '#result' => $result,
      '#cache' => ('max-age' => 0)
    );

}
public function title($player){
$title = "";
/* --------------
 code logic here 
------------------ */
return (
        '#type' => 'markup',
        '#markup' => $title
        );
}
}

I have been stuck with this issue for a long time. Any help would be appreciated.

SELECT TOP 1 in wp_query for each meta value group

Is there a way to use the wp_query class to execute the SELECT TOP 1 sql command by using groupby for each meta_value result. I need wp_query to select only the first of each group by meta_value results. Can not find on google an example with wp_query! I can only find SQL queries using the get_posts wordpress function but I do not want to use get_posts. Any help appreciated.

Thank you

magento2 – Automatically change meta descriptions and urls

The URL of the page changes automatically, every week, can I know if a method can stop that?

In addition, the site has two language directories, the meta-description and title are automatically changed, they change automatically and display only the title and description in English. Could I know a solution?

Thank you

What is the proper way to store information such as the user scoring an article as a favorite? In post meta or meta user?

I have custom message types such as course, lesson, and lesson_topic and I have an ajax call to mark a lesson_topic as a favorite for a user. I'm doing it right now in the ajax manager:

function topic_mark_favorite () {
    if ( !wp_verify_nonce( $_REQUEST('nonce'), "topic_mark_favorite_nonce")) {
        file_put_contents(ABSPATH.'wp-content/debug.log', 'Something went wrong' . PHP_EOL, FILE_APPEND);
        exit("Something went wrong...");
    }

    $id = $_REQUEST("post_id");
    $user_id = get_current_user_id();
    $result=0;
    if ($user_id) {
        $result = update_post_meta($id, 'user_favorite', $user_id);
    }
    if ($result) {
        $result_type= 'success';
        $result = ('type' => $result_type);
    } else {
        $result = ('type' => 'error');
    }
...
}

You wonder whether this is reasonable or if I should do it in a fundamentally different way.

I thought about using user meta and having a meta-field such as favorites but then I should store JSON data to extract what I need in context.

For example, depending on the view, I might want to get users' favorites for a given lesson. Or for the whole course. As I have existing post-meta relationships, I can still get lessons lessons for the current lesson or for all the lessons of a course. That's why I thought about continuing to use post meta but I can not help but think that I approach maybe wrong.

As mentioned above, I'm just thinking of removing Post Meta and using custom tables …

Curious to hear thoughts!

Brian

What is the best – Meta Robot tags or robots.txt?

What is the best – Meta Robot tags or robots.txt?

seo – How can I solve the same meta title for different subdirectory domains?

I have several subdirectory domains (example.com/au, example.com/us, etc.) with the same language. I've updated the same title for all subdirectory domains, but Google only changes one. Please, help me solve this problem. Thanks and best wishes.

meta tags – Adds a property to schema_article_author (schema_metatag)

I want to add the property honorifiqueSuffix to the authors of an article.
Since the author is not a group in terms of schema_metatag definitions, I can not add the field, as indicated via schema_article_example module.

How can I add the property as a "subkey" of the article_author "field".
I do not want to patch on the SchemaPersonOrgTrait or SchemaPersonOrgBase to get this property in the schema metadata.

This should be feasible via a custom tag, as in the sample module.

seo – What are the best meta robots tags?

Recently, I found 2 additional meta-robot HTML tags, but I'm not sure of the best meta-robot tag. you can check below

1] 
or
2] 

Anyone, please tell me, which one is the best for seo google!

post meta – Woocommerce – Get the previous price

I use the following function to get the price of a product:

get_post_meta( $item->get_product_id() , '_regular_price' , true );

Currently, prices change frequently. Is it possible to get the previous price? I do not know if WordPress saves this historical information and if there is a way to get it with any function.

Thank you.