• Resolved rockforduk

    (@rockforduk)


    Hi Everyone,
    Is it possible to include default text along side the original description from the geodirectory template or wordpress theme? For example in list view if you wanted to add default text into the list view description only. How would you do it?

    Thanks

    Rockforduk

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stiofan

    (@stiofansisland)

    Hello @rockforduk,

    Anything is possible, but if you explain more what you want/need i will tell you the best way to achieve it.

    Thanks,

    Stiofan

    Thread Starter rockforduk

    (@rockforduk)

    Hi Stiofan,
    All i need to know is if i wanted to add some default text to list view only how would i do it please? Say someone added a listing be with no description then the default text would show on list view.

    Thanks

    Plugin Author Stiofan

    (@stiofansisland)

    You can add this code snippet to your child theme or via the “code snippets” plugin

    add_action('geodir_after_listing_post_excerpt','_my_default_desc_listview',10,1);
    function _my_default_desc_listview($post){
    	if($post->post_content==''){
    		echo "this is a default description, if blank";
    	}
    
            echo "this text will be added to all listings";
    
    }

    Let me know if u need help with this: there is another hook also but it places the text much further up “geodir_before_listing_post_excerpt”

    Thanks,

    Stiofan

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

The topic ‘Geodirectory Listview Customisation’ is closed to new replies.