The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

single.php, functions.php.. executed multiple times for every post (1 post)

  1. tommix
    Posted 7 years ago #

    Hi i was using my own shorcodes in functions.php file. lets say:

    i have shortcode [date], this will execute function which will write date to the database in my created table so i can retrieve it with other shorcode to show on post content.. so far so good, but....let say i have 100 post with that shortcode so when i open ONE POST it will execute that shortcode on EVERY post. I tried to add my function and shortcode to single.php -it does the same - runs the shortcode in EVERY pos, not only in that who suposte to be updated.

    so how can i do this:
    that ONLY post who is open, lets say http://www.domain.com/post-1.htm, will be updated and executed, NOT all posts at the same time.

    P.S date is just an example this is not real deal, so do not explain me how to use date and so on. .:)

Topic Closed

This topic has been closed to new replies.

About this Topic