• Resolved mr_pa

    (@mr_pa)


    Hi there,

    firstly i pay you compliments for your plugin, very well coded and lightweight!

    Unfortunately i’m facing with an issue relating the Genesis Author Pro Plugin and in particular with the custom post type main archive setting.

    https://it.www.ads-software.com/plugins/genesis-author-pro/

    I don’t know why the SEO famework fields don’t are available in the CPT main archive setting.

    So i was wondering if there is a filter to disable the SEO framework in that particular page and keep at the same time all the funcionalities in the single CPT pages (books).

    Thanks in advance for your future response.

    Paolo

    https://www.ads-software.com/plugins/autodescription/

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

    (@cybr)

    Hi Paolo,

    Thanks!

    Could you please check out the Screen Options on the said pages (top right of your dashboard, below your name) and see if the SEO checkbox is checked? I think this should solve it, as all terms and pages by the Author Pro plugin are compatible with The SEO Framework.

    There are many filters, actions and other hooks available. Unfortunately, I don’t quite understand what you wish to achieve.

    Could you please list it as following:
    1. What you see, and where you see it.
    2. What you expected to see.
    3. What you want to change about it.

    Thanks and have a great day!

    Thread Starter mr_pa

    (@mr_pa)

    Hi Sybre,

    thanks for the speedy response.

    This is what i see in the CPT archive setting:

    https://imgur.com/m7McwI3

    As you can notice the SEO options i flagged and it’s not possible to uncheck it.
    Furthermore there is not any SEO setting of the SEO Framework.

    Do you have any hint to fix it?

    Thanks,
    Paolo

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Paolo,

    The SEO checkbox you see is a “Column”, which is there because of a bug (fixed in next version). ??

    The page you see there is for the global Books taxonomy archive. Each term (child of taxonomy) has SEO settings, i.e. Authors, Series and Tags.

    SEO settings are only available to pages which have the Title attribute (as in Posts) and the Editor attribute (where you can fill in the post content). The “Archive Settings” page (on the image you sent) doesn’t have such attributes and it’s therefore impossible to add SEO settings in the current form The SEO Framework is presented. In the future I will of course look for possible injections. Until then, I’m afraid you can’t edit the output within WordPress.

    I also see it takes the latest book title and puts it in the title and description, this is a bug which I will be sure to fix in the next update.

    For now, I suggest using the script below to adjust the title and description.

    The global SEO Settings require administrative privileges to be accessed. More specifically, you require the manage_options capability.

    I hope this helps and clears things up!

    Please note: this script has not been tested and requires two line changes:
    My Custom Description goes here.
    My Custom Title goes here.

    It also has some cache, as a check is performed 6 times on each page otherwise.

    <?php
    
    add_filter( 'the_seo_framework_description_output', 'my_custom_tsf_description' );
    add_filter( 'the_seo_framework_ogdescription_output', 'my_custom_tsf_description' );
    add_filter( 'the_seo_framework_twitterdescription_output', 'my_custom_tsf_description' );
    /**
     * Manipulate the description.
     *
     * @param string $description : Default ''
     * @see is_genesis_books_archive()
     *
     * @return string Description.
     */
    function my_custom_tsf_description( $description ) {
    
    	if ( is_genesis_books_archive() )
    		$description = 'My Custom Description goes here.';
    
    	return $description;
    }
    
    add_action( 'init', 'my_custom_tsf_title_before' );
    /**
     * Evade The SEO Framework's title buster.
     */
    function my_custom_tsf_title_before() {
    	add_filter( 'pre_get_document_title', 'my_custom_tsf_title', 11 );
    
    	//* This one's tricky.
    	add_filter( 'wp_title', 'my_custom_tsf_title' );
    }
    
    add_filter( 'the_seo_framework_ogtitle_output', 'my_custom_tsf_title' );
    add_filter( 'the_seo_framework_twittertitle_output', 'my_custom_tsf_title' );
    /**
     * Manipulate the Title.
     *
     * @param string $title : Default ''
     * @see is_genesis_books_archive()
     *
     * @return string Title
     */
    function my_custom_tsf_title( $title ) {
    
    	if ( is_genesis_books_archive() )
    		$title = 'My Custom Title goes here.';
    
    	return $title;
    }
    
    /**
     * Cached Genesis books check.
     *
     * @staticvar bool $cache Whether we're on the Genesis Author Pro book archive.
     *
     * @return bool
     */
    function is_genesis_books_archive() {
    
    	static $cache = null;
    
    	if ( isset( $cache ) )
    		return $cache;
    
    	return $cache = is_archive() && 'books' === get_query_var( 'post_type', false ) ? true : false;
    }

    Thread Starter mr_pa

    (@mr_pa)

    Thanks Sybre,

    your hack works like a charm!

    You are my hero ??

    Keep update this fantastic plugin!
    Five stars are not enough!

    Cheers,
    Paolo

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CPT Issue – Genesis Author Pro Plugin’ is closed to new replies.