[Resolved] How to insert "custom area" after X post in Blog part?

Home Forums Support [Resolved] How to insert "custom area" after X post in Blog part?

Home Forums Support How to insert "custom area" after X post in Blog part?

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #298072
    Dmitry Bychenko

    Hello,

    How to insert “custom area” (to put banner in my case) after every X post in Blog part?
    background, width.. could be the same size as Post’s box.

    Example

    sorry, didnt use the search. not sure how to word it.

    #298122
    Leo
    Staff
    Customer Support

    Hi Dmitry,

    I think this plugin might do what you want: https://en-ca.wordpress.org/plugins/ad-inserter/

    Give it a shot and let me know?

    #298303
    Dmitry Bychenko

    Hi, Leo, thanks for answer.

    I dont think it’s what i want.
    if i have understood it correctly, this plugin inserts Ad inside the post (inside the text of the particular post).

    Im looking for opportunity to insert ad between the posts themselves (without going inside of the posts).

    for example, you installed new WP and in Settings -> Readings you have Front page displays settings:
    [tick] Your latest posts, i.e.
    Front page: none
    Posts blog: none

    With this settings on your front page you have list of articles, for example:

    Post 1. How to install WP?
    Post 2. How to set up WP?
    Post 3. How to install plugin on WP?
    “Custom area”: Whiskas – cats best friend
    Post 4. How to add new user in WP?
    Post 5. How to move WPsite to another hosting?
    …. and so on.

    check the example:
    Example

    Insert custom area in the list of posts, NOT inside the post itself.
    ———————————-
    Another example:

    If you take WP+GP site, and go to some Post Category
    for example, you have site with categories:
    Install WP
    Set up WP
    Database
    Hosting
    FAQ
    ….

    and in the list of categories you click “FAQ”
    you move to this address http://mysite.com/category/faq

    the very first block, where category title is written is a good example of what i want i get.

    #298529
    Tom
    Lead Developer
    Lead Developer

    I’ve looked into this before. It requires you to edit the structure of how WP displays the posts.

    For example: http://wordpress.stackexchange.com/questions/61136/insert-image-or-ad-script-after-3-posts-using-the-loop

    There’s not an easy solution I’m afraid. If you do attempt to do it, you’ll want to use a child theme.

    #298631
    Dmitry Bychenko

    ok, thanks

    #298771
    Tom
    Lead Developer
    Lead Developer

    No problem. Let me know if you hit any road blocks along the way πŸ™‚

    #298870
    Dmitry Bychenko

    Tom, is there some WP plugin which can do that?

    #299009
    Tom
    Lead Developer
    Lead Developer

    Not that I’m aware of, but there’s a lot of plugins out there I’m not aware of πŸ™‚

    I’ll keep an eye out.

    #299028
    Dmitry Bychenko

    thanks

    #329364
    Dmitry Bychenko

    Hi, Tom,

    I have created child theme, syle.css and functions.php are in Child theme folder.
    and i contacted ad plugin developer.

    they sent me instructions on how to put ad between X amount of posts:
    http://wordpress-advertising.tunasite.com/docs/using-template-tag/

    Can you say a bit more how to use their code?

    #329398
    Tom
    Lead Developer
    Lead Developer

    That won’t put anything between x amount of posts, it’s just a way to display their shortcode in a template file (PHP code).

    #348172
    Dmitry Bychenko

    I contacted plugin developer, he wanted to see single.php
    I showed him single.php, thats what he replied:

    “Your themes single.php is split up into different functions. You will need to get the page that gets loaded by the following function:
    <?php get_template_part( ‘content’, ‘single’ ); ?>”

    Can you tell me what he wants?

    #348312
    Tom
    Lead Developer
    Lead Developer

    The loop that displays the content of the single posts is inside the content-single.php file.

    So that’s the file you would need to overwrite if you need to make changes.

    #348624
    Dmitry Bychenko

    thanks!

    #348889
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.