• Resolved infomate

    (@infomate)


    when accessing the https://mysite/ads/ slug to view all listings, the header title displays the title of the first ad on my list.
    Can the header title for the main ads (all listing) be changed ?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Farhan Noor

    (@farhannoor)

    Hi Infomate

    It seems that incorrect function is written in your theme’s template file (i. e. archive.php) to display Title of the listings. The correct function to display title on archive pages is post_type_archive_title();

    You can also create custom template file archive-aol_ads.php to completely control the output of mysite/ads page.

    If you are not a developer and looking for a quick solution then create a new wordpress page from the WP Admin panel, put your own title and write shortcode [aol] in the content box. Now on the front-end(public side) this page will contain all the ads with your desired TITLE and content.

    Regards
    Farhan

    Thread Starter infomate

    (@infomate)

    Tried as suggested. solved my title problem with All ads listing by creating a new page.
    But I noticed that individual ads also doesn’t have the proper title.

    I’m using Automotive theme.

    Can you guide how I can make some code changes to make this work.
    AOL screen shot

    Plugin Author Farhan Noor

    (@farhannoor)

    Hi,

    Send me URL of your website page where you have title problem. Try replacing TITLE code in single.php file of your theme with <?php the_title(); ?>. You can find exact HTML markup to replace code with code inspector in your browser.

    Regards
    Farhan

    • This reply was modified 8 years, 1 month ago by Farhan Noor.
    Thread Starter infomate

    (@infomate)

    Farhan,

    This is the site: https://toyotadumaguetecity.com/ads/
    “/ads” is the default All ads listing page.

    Notice the “Express Service Automotive Technician” header title.

    Plugin Author Farhan Noor

    (@farhannoor)

    Yes, this theme need some fixes to provide better support for custom post types. I have already pointed out those fixes. If you want me to fix this theme, please send me a copy of this theme in zip format to [email protected]

    Farhan.

    Thread Starter infomate

    (@infomate)

    Farhan,

    Here’s the automotive theme:
    https://1drv.ms/u/s!Au2h-I6MPp7OmlLKWs0iT9PcWNZX

    Thanks.

    Robert

    Plugin Author Farhan Noor

    (@farhannoor)

    Hi Robert,

    Replacing header.php file in your theme with this one https://www.dropbox.com/s/xg9zb7f6d6rdyjn/header.php?dl=0 may solve the problem.

    Regards
    Farhan.

    Thread Starter infomate

    (@infomate)

    I guess that did the trick.

    So far so good. Thanks

    Robert

    Plugin Author Farhan Noor

    (@farhannoor)

    Hi Robert,

    Can you please rate this product and write your reviews HERE

    Thank you
    Farhan.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘title of ads slug display the first ad title’ is closed to new replies.