Support » Plugin: Advanced Sidebar Menu » Turn Off Or Change Title Text

  • Resolved musicforte

    (@musicforte)


    I purchased advanced sidebar menu pro. I would like to turn off or change the title text that appears in the category lists.

    I have rather long descriptions for my category pages, and I don’t want to output all of that as the title text.

    Can you please point me in the right direction?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mat Lipe

    (@mat-lipe)

    Hello,

    There is currently no support for doing this out of the box. However I really like this idea so I’m throwing it on the board for a future release.

    To do this using filters you could adjust the names as they come in. Here is a super crude example for using just the first word.

    	add_action( 'advanced_sidebar_menu_widget_pre_render', function(){
    			add_filter( 'list_cats', function( $name ){
    				return strtok($name, " ");
    			});
    		});
    Thread Starter musicforte

    (@musicforte)

    Mat, you’re really quick and helpful! Thanks so much for the support and your excellent plugin!

    Thread Starter musicforte

    (@musicforte)

    My website uses the category description for the title text.

    Your snippet above truncates the actual link name.

    So for example:

    <a href="some-website.com" title="a paragraph or two from the category description. Whatever it is, it is much too long.">Link Name</a>

    What I was hoping to stop was the title you see when the mouse hovers the link, which contains the paragraphs.

    Plugin Author Mat Lipe

    (@mat-lipe)

    This should do the same thing for descriptions

    	add_action( 'advanced_sidebar_menu_widget_pre_render', function(){
    			add_filter( 'category_description', function( $name ){
    				return strtok($name, " ");
    			});
    		});
    Thread Starter musicforte

    (@musicforte)

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Turn Off Or Change Title Text’ is closed to new replies.