ShortCode Directly Into Theme
-
Hi
How can I directly insert the ShortCode [toc] or the table of content function in theme single php file?Instead of auto inserting I want to insert the TOC at a specific place in my theme. Which can be done only by adding the ShortCode or php code directly to the theme file.
I tried to add this code to my single.php file but it is not content. I disabled the auto insert on post.
Even checked it with auto insert enabled, but it didn’t worked.
This is the Error I am getting at the place where the ShortCode was inserted:
<script type=”text/javascript”>var ajaxurl = “https://www.technewsinc.com/wp-admin/admin-ajax.php”,comp_link = “https://www.technewsinc.com/compare/”,comp_cn = “aps_comp_www_technewsinc_com”,msg_suc = “Success: You have added %title% to your comparison list“,msg_ful = “Sorry: Your Comparison list is full, you can compare upto 3 products at a time.”,msg_dup = “%title%: is already found in your comparison list“,msg_rem = “%title%: is successfully removed from your comparison list“;</script>
<!–TOC–>Please can you help me out on the same
- The topic ‘ShortCode Directly Into Theme’ is closed to new replies.