WordPress.org

Ready to get started?Download WordPress

Forums

Instagrab
[resolved] structure of posts (3 posts)

  1. Kobekes
    Member
    Posted 1 year ago #

    Hi,

    is there a way to change the structure of the posts made by instagrab?

    Now it is like this:

    <a href="**to tag**"><img width="30" src="**profile-image**"/>
    **name**</a><img src="**instagram image**" alt=""/>
    
    <h3><a target="_blank" href="**link to image**"><img border="0"
    src="**instagram_logo.png**" alt="Posted on Instagram"/></a>
     ** Caption of instagram image**</h3>

    The caption (title) of the instagram picture is also the title of the post.

    I can change the css for <h3>, but how do I remove the profile picture for example?

    Thanks.

    Erik.

    http://wordpress.org/extend/plugins/instagrab/

  2. Kobekes
    Member
    Posted 1 year ago #

    Do I have to plunge into the instagrabGrabAndSave-function in instagrab/instagrab.php to do this?

    function instagrabGrabAndSave() {
    		$hashtags = explode("\n", get_option($this->prefix . "tags"));
    
    		require_once(ABSPATH . 'wp-admin/includes/taxonomy.php');
    
    		foreach($hashtags as $hashtag) {
    			$category_id = wp_create_category($hashtag, 0);
    			$images = $this->instagrabGetImagesByHashtag($hashtag);
    
    			foreach($images as $image) {
    				$link = home_url() . "/?tag=" . $image['author']['username'];
    				$content = <<<EOF
    	<a href="{$link}"><img width="30" src="{$image['author']['picture']}"/> {$image['author']['username']}</a>
    	<img src="{$image['images']['large']}" alt=""/>
    	<h3><a href="{$image['link']}"><img border="0" src="{$this->instagram_logo}" alt="Posted on Instagram"/></a> {$image['title']}</h3>

    [Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum's parser.]

  3. Ole-Kenneth
    Member
    Plugin Author

    Posted 1 year ago #

    Short answer: yes

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic