• Resolved marcuscent

    (@marcuscent)


    Can anyone help me out with how to add a record count on my category archive pages in GD when using Elementor templates? I just want to show a variable within a text block. Like this – “We have found X amazing [tours] for you to choose from”.

    I can’t seem to find anything in the documentation to tell me how to do this. Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support alexrollin

    (@alexrollin)

    Hello,

    GD doesn’t have that right now, but I will check with the team about it.

    Thanks for your patience while I look into it.

    Plugin Support alexrollin

    (@alexrollin)

    Hello,

    There are two ways two show postcount on the archive pages.

    1) Via GD > Loop Paging
    Use GD > Loop Paging elementor widget and select “Show Advanced pagination” to “Only(hide paging)”

    2) Via %%postcount%% in text block.
    – Use %%postcount%% in Elementor text block
    – Add the following PHP code snippet

    function gd_snippet_widget_text( $content, $settings = array() ) {
    	if ( strpos( $content, '%%postcount%%' ) !== false && function_exists( 'geodir_title_meta_postcount' ) ) {
    		$content = str_replace( "%%postcount%%", (int) geodir_title_meta_postcount(), $content );
    	}
    
    	return $content;
    }
    add_filter( 'widget_text', 'gd_snippet_widget_text', 10, 2 );

    Let us know how it goes

    Thread Starter marcuscent

    (@marcuscent)

    Thanks Alex. Much appreciated. I used the GD > Loop method.

    Plugin Support alexrollin

    (@alexrollin)

    Excellent!

    If you like what we do, feel free to leave a review!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show a count of records for each category.’ is closed to new replies.