How to add shortcode in listing and search page?

This topic contains 1 reply, has 1 voice, and was last updated by  giuseppe cuttone 7 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #374908

    giuseppe cuttone
    Buyer
    Post count: 242

    Hi,
    I’d like add a shortcode in listing page and search page.
    In wordpress, if I want add a shortcode in the PAGE X, I can use differents solutions:
    1. Adding shortcode into the editor content of the PAGE X (Dashboard=>All Pages=>Page X
    2. Adding shortcode into a TEXT WIDGET, and after that to add the TEXT WIDGET into the PAGE X
    3. Adding shortcode into a TEMPLATE FILE using do_shortcode() method.
    The problem are the following:
    1. Listing an search page are not page located in Dashboard=>Pages, so I can’t use solution 1.
    2. I also can’t use solution 2, because I need add shortcode in “CONTENT SECTION”, and not in TOP SECTION.
    So, I only can use the third solution.
    In conclusion, if I am right, I need add the following snippet:

    <?php do_shortcode('[ajax_load_more]'); ?>

    into a TEMPLATE FILE, but I don’t know:
    1. Where are located the correct listingfile.php and searchfile.php (for listing and search page)
    2. What are the names (for each custom post type there is a different file?)
    I hope your answer.
    Thanks for your support.

    #374910

    giuseppe cuttone
    Buyer
    Post count: 242

    Hi, at the moment I don’t need reply for this.
    If in the future I will need a reply, so I come back to reopen the post.
    Sorry for the inconvenient.

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount