FlatPress y Motores de b
  • Hola comunidad,

    Pregunta: Existe alg
  • <?php
    /*
    Plugin Name: CatTitle
    Plugin URI: http://www.flatpress.org/
    Description: Show category name in html meta
    Author: NoWhereMan
    Version: 1.0
    Author URI: http://www.nowhereland.it/
    */

    function plugin_cattitle_head() {
    global $fp_params;
    if (isset($fp_params['cat'])) {
    $category_names = entry_categories_get('defs');
    if (isset($category_names[ $fp_params['cat'] ]))
    echo '<meta name="Title" content="' . $category_names[ $fp_params['cat'] ] . '" />';
    }
    }
    add_action('wp_head', 'plugin_cattitle_head');



    this should do what you're asking for; it could be extended with other METAs too.
  • Hi, I tried it and didn't work for me until I changed
    $fp_params['category']
    with
    $fp_params['cat']

    I think this plugin could be changed to give the SEO plugin some members asked for some weeks ago, what do you think NWM?
  • I think this plugin could be changed to give the SEO plugin some members asked for some weeks ago, what do you think NWM?


    yes, that's what I meant with

    Posted By: NoWhereManit could be extended with other METAs too.


    bye :)
  • Hi all.

    This plugin does not work for me, why?. I changed category x cat... Activate plugin... Review permissions
    - The variable is empty.
    Use flatpress vivace with Pretty url, any idea?... thanks
  • I've now fixed the code as suggested by flat2007, it should work

    bye
  • Hi NoWhereMan,

    {$flatpress.cattitle} ?.

    Thanks.
  • there's no such thing like "{$flatpress.cattitle}" at the moment...
  • Fixed... plugin work fine.
  • hi everybody
    i have taken the code from above
    but
    with
    $fp_params['category']
    or
    $fp_params['cat']
    it doesn´t work
    what else could be the problem
    here my code:

    <?php
    /*
    Plugin Name: CatTitle
    Plugin URI: http://www.flatpress.org/
    Description: Show category name in html meta
    Author: NoWhereMan
    Version: 1.0Author
    URI: http://www.nowhereland.it/
    */

    function plugin_cattitle_head()
    {
    global $fp_params;
    if (isset($fp_params['category'])) {
    $category_names = entry_categories_get('defs');
    if (isset($category_names[ $fp_params['category'] ])) { echo '<meta name="Title" content="' . $category_names[ $fp_params['category'] ] . '" />'; }
    else { echo '<title>' . $pagetitle . '&raquo;' . $flatpress.TITLE . '</title>';}
    }}

    add_action('wp_head', 'plugin_cattitle_head'); ?>


    filename: plugin.cattitle.php
    folder: /html/fp-plugins/cattitle/

    I hope you can help me
    best regards
  • Speaking on the same topic.
    Is there any way to use the variable $ category_name [$ fp_params [ 'cat']] of plugin-cattitle and print it in the body of the page?. This way I can give info to the search engine. If you could add a short description, it would be perfect.

    Thanks for everything.
  • plugin don't work :-(
This discussion has been closed.
All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion