• dgellis

    (@dgellis)


    Hi,

    I need to put up a ticker tape of market gold prices. I already have the information available to me in PHP. Where I’m stuck is how to get Ditty to display it.

    I thought I would simply update the field in the database where the ticker text is stored, but I’m unable to find it by reverse engineering the database after installing Ditty and creating a text ticker.

    Is there a better way to do this?

    If not, where in the database is the ticker text stored? If it’s not in the database, where is it so I can update it?

    Thanks in advance!

    Darren

    https://wordpress.org/plugins/ditty-news-ticker/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dgellis

    (@dgellis)

    Right after I posted this. I found it in wp_postmeta. It’s got other variables around it. Is there documentation anywhere on these variables? I’d like to be able to custom generate a ticker string and insert it into the correct record in wp_postmeta.

    Thanks!

    Darren

    Plugin Author metaphorcreations

    (@metaphorcreations)

    The easier/better way of going about this would be to use the built-in filters and just populate the ticks through php as opposed to trying to modify the database (which I don’t have any suggestions on accomplishing this). Here’s a starting point (add to either your theme’s funtions.php file, or a build a custom plugin to run the code):

    function my_custom_ticks( $ticks, $id, $meta_data ) {
    
    	if( $id == 555 ) {
    
    		$new_ticks = array();
    
    		// Use your php here to create an array of data (each array item is a "tick").
    
    		// Return the new ticks
    		return $new_ticks;
    	}
    
    	return $ticks;
    }
    add_filter( 'mtphr_dnt_tick_array', 'my_custom_ticks', 10, 3 );

    You would need to create a ticker in your dashboard, but you wouldn’t have to actually create any ticks for it as the code above would be used to populate the ticker. Be sure to change the “555” to the post ID of your ticker.

    Thread Starter dgellis

    (@dgellis)

    Thank you very much. I’ll take this ball and run with it!

    Awesome!

    Darren

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

The topic ‘Where is Ticker Text Stored’ is closed to new replies.