• Nice plugin!

    How can I get and echo in PHP SEO elements structure configured on the SEO tab ( {title} with [attribute] [values] and [attribute] [values] ) ?

    Thanks in advance

    • This topic was modified 4 years, 3 months ago by Pinoss.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello,

    You can use action braapf_seo_meta_title to store instance of SEO class, then you can use this instance after WordPress get_header function $instance->get_filters_string('title text');.

    Regards,
    Oleg

    Thread Starter Pinoss

    (@pinoss)

    Thanks for your response,

    I tried it but is not working for me, probably i’m missing something.

    I want to show the actual filtered URL title before products on product categories pages.
    I’m detecting if actual URL have any filter applied:

    if ( isset( $_GET['filters'] ) )

    and if it’s TRUE, I want to echo the title (is configured on SEO elements structure tab in order to show with filters names and values).

    Can you share an example please?

    Thanks in advance!

    Plugin Author RazyRx

    (@razyrx)

    Hello,

    Please provide code that you trying to use?

    Regards,
    Oleg

    Thread Starter Pinoss

    (@pinoss)

    Hi!

    This is my code, but I don’t know where to put “braapf_seo_meta_title” action and $instance.

     
    
    //Check if actual URL contain some filters
    if (  isset( $_GET['filters'] )) {
    				
    	// if yes, echo title generated by ajax advanced filter plugin		
    echo "<h1>HERE NEED TO SHOW TITLE VARIABLE</h1>";
    
    }
    		

    Regards.

    • This reply was modified 4 years, 2 months ago by Pinoss.
    Plugin Author RazyRx

    (@razyrx)

    Hello,

    To store instance use this code

    add_action('braapf_seo_meta_title', 'bapf_custom_store_seo_meta_instance', 10, 1);
    function bapf_custom_store_seo_meta_instance($instance) {
       global $store_bapf_seo_meta_var;
       $store_bapf_seo_meta_var = $instance;
    }

    To use it use this code

    global $store_bapf_seo_meta_var;
    $store_bapf_seo_meta_var->get_filters_string('title text');

    Regards,
    Oleg

    Thread Starter Pinoss

    (@pinoss)

    Wow awesome! Thanks a lot! Great plugin and support! I’ll give 5 star review

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Get “SEO elements structure” with PHP’ is closed to new replies.