Home › Forums › All Other Themes › Shortcodes appearing at home page
- This topic has 6 replies, 3 voices, and was last updated 8 years, 10 months ago by
Raimondo Zoroddu.
-
AuthorPosts
-
May 16, 2016 at 4:55 pm #33792
Hello, why are the shortcodes showing as text under the sections area?
I do not want them to appear in public.
I use the Girlie Theme.
At the sections area I just choose the pages for my portfolio and contact page where I want the pages to link to but…at these pages I have inserted the shortcodes that are visible at home page. Hope there is a fix around this
May 16, 2016 at 5:02 pm #33793Hello Markia, I’ve the same problem, you can have a look at THIS post.
I will follow your post too, so the first solution will be right for both of us 😉Ciao
RaimondoMay 16, 2016 at 5:15 pm #33796thanks I also watch your post for relative answer
May 17, 2016 at 7:39 am #33849For both of you kindly go to index.php and search excerpt and change it to content if this is difficult for you both we would like to get admin access to the site via sktthemes.net/contact
This way it will show the shortcodes.
Regards,
ShriMay 17, 2016 at 7:40 am #33850On another thought kindly set up normal pages and then you can redirect them to the ones with shortcodes.
Or keep shortcodes in middle area and only have text in the top 30 words to have no shortcode displayed on homepage.
Regards,
ShriMay 17, 2016 at 9:48 am #33865Hello Shri,
id did as you’ve suggested and it just showed me up 3 dots “…”On your second instance suggestion, I actually don’t know how to redirect a page inside wordpress. Just looked HERE, but i don’t want to install and study another plugin…
So this is my solution: PHP
Went to index.php file (under the Theme directory) and edited like this:
<?php $contenuto = wp_trim_words( get_the_content(), $complete['featured_excerpt'] );?> <p><?php echo str_replace("[su_row] [su_column size=\"1/2\"]",$cambia, $contenuto); ?></p>
I’ve searched my shortcode and replaced with nothing, so it won’t show in homepage anymore…
The only thing is: next time i will update the theme, I will loose my edit, do you know “something” to avoid loosing of php direct editing to the theme ?
Hope my solution could even be usefull for Markia 🙂
Best Regards
RaimondoMay 17, 2016 at 10:14 am #33869Yeah, child themes…
-
AuthorPosts
- The topic ‘Shortcodes appearing at home page’ is closed to new replies.