WordPress.org

Ready to get started?Download WordPress

Forums

Dashboard Widget Sidebar
[resolved] Widget Titles (8 posts)

  1. nikmav
    Member
    Posted 11 months ago #

    Hi,

    Great little plugin. Only problem I've found is that if you put in 2 widgets in the Dashboard Widget Sidebar with different titles and content the titles are the same as the last one in the list when displayed on the user dashboard.

    Is there a way to have the titles on the dashboard be different as in the same as they are titled in the widget itself?

    Thanks

    Nik

    http://wordpress.org/extend/plugins/dashboard-widget-sidebar/

  2. nikmav
    Member
    Posted 11 months ago #

    After further investigation it seems that when you have 2 of the same widget the 2 widgets will have the same title however 2 different widget types eg. 1 Text and 1 Categories don't have the problem.

    Any advice?

  3. Kenan
    Member
    Posted 9 months ago #

    Same problem here.
    Anyone?

    Thanks

  4. nikmav
    Member
    Posted 9 months ago #

    Hi Kenan,

    I have solved this problem by rewriting some of the code in the block at lines 86 - 102.

    Replacing the existing code with this worked for me:

    foreach($dws_widgets as $id)
    		{
    			//Gets widgets unique number
    			$widgetnumber = $wp_registered_widgets[$id]["params"][0]["number"];
    
    			//Check if the required data is set
    
    			if( isset($wp_registered_widgets[$id]) && isset($wp_registered_widgets[$id]["callback"]) && isset($wp_registered_widgets[$id]["callback"][0]) && $wp_registered_widgets[$id]["params"][0]["number"] == $widgetnumber)
    			{
    				//Get widgets settings
    
    				$widget = $wp_registered_widgets[$id]["callback"][0]->get_settings();
    				//set Titles
    				if($widget[$widgetnumber]["title"]=='') {
    					$title = " ";
    				} else {
    					$title = $widget[$widgetnumber]["title"];
    				}

    What that's doing is getting the widgets unique ID from the parameters and pulling the title using that. The code then checks if the title is empty and sets a blank title rather borking itself!

    Not sure if that is the cleanest way to do it but it seems to run ok.

    Hope that helps!

    Nik

  5. Morten Dalgaard Johansen
    Member
    Plugin Author

    Posted 8 months ago #

    Hi guys,

    Sorry for not replying sooner.

    Great that you found a solution for this, Nik. Thanks!

    I have included the fix in the latest release, along with some new features for placement of the widgets on the dashboard.

    For more information, see the changelog: http://wordpress.org/plugins/dashboard-widget-sidebar/changelog/

    If the issue somehow is not fixed with the new release (version 1.1.0), please let me know.

    Once again, thank you for fixing the bug, Nik.

    Best regards
    Morten Dalgaard Johansen
    IO SoftGame
    http://www.iosoftgame.com

  6. nikmav
    Member
    Posted 8 months ago #

    Thanks Morten and thanks again for the credit!

    Awesome plugin! I use it on every site I build. Very handy!
    Keep up the great work!

    Nik

  7. Atlanta
    Member
    Posted 7 months ago #

    Thanks for the fix, it definitely helped with the naming of the titles. I see the dropdown selector for priority level but I am unable to save my selection.

    Suggestions?

  8. Morten Dalgaard Johansen
    Member
    Plugin Author

    Posted 7 months ago #

    #Atlanta: Can you please provide me with the following details: WordPress version on your site and what operating system and browser (name and version) you are using on your computer as well as if javascript is enabled or not. You can also find the information by visiting this website: http://www.whatbrowseramiusing.co

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.