Tagged: x
-
AuthorPosts
-
July 18, 2016 at 2:02 am #1091432
This is one of my first attempts at editing Views by following this help article https://community.theme.co/kb/customization-best-practices/. I’m trying to add a row above the Renew footer – but I can’t get it to work.
Here are the step I have taken:
1) I want to build and style some content in the cornerstone page builder, and then copy the shortcode it generates into a php file that I can place into different areas of my site. So first of all I opened a page, created a single row and edited my Cornerstone page as needed.
2) I then went to the page edit screen and clicked on the “text” tab to get all the cornerstone shortcodes that were generated for me.
3) I pasted all that shortcode into a new php file named cs-dump-footer-top-row.php, and I wrapped all the shortcode in the wordpress function <?php echo do_shortcode(‘[YOUR_SHORT_CODE_HERE]’);?>.
4) I added this new View I created to my child theme at /public/wp-content/themes/x-child/framework/views/renew/cs-dump-footer-top-row.php
5) I copied over the file I wanted to edit from /public/wp-content/themes/x/framework/views/renew/wp-footer.php into my child theme at /public/wp-content/themes/x-child/framework/views/renew/wp-footer.php
6) I edited that wp-footer.php file by including the hook <?php x_get_view( ‘renew’, ‘cs-dump-footer-top-row’ ); ?> in the position I wanted to display the cornerstone shortcode.
7) I saved everything and cleared all cookies and refreshed the page, but there are no changes.
I also tried without wrapping the cs-dump-footer-top-row.php shortcode in <?php echo do_shortcode(‘[YOUR_SHORT_CODE_HERE]’);?> but that also did not work.
Any ideas where I went wrong and how to fix it?
Here is a 2 min screencast showing the steps I took: http://screencast.com/t/NDjQicPCkVk
July 18, 2016 at 2:05 am #1091433This reply has been marked as private.July 18, 2016 at 2:09 am #1091437Hi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
July 18, 2016 at 9:18 pm #1092835This reply has been marked as private.July 19, 2016 at 1:36 am #1093002Hi there,
Please check the attachment, I’m not able to connect to your host files.
Thanks.
July 19, 2016 at 2:53 am #1093073This reply has been marked as private.July 19, 2016 at 3:46 am #1093137Hi there,
Please update your shortcode to :
[x_section parallax="false" style="margin: 0px;padding: 0px;"][x_row inner_container="true" marginless_columns="false" class="cs-ta-center" style="margin: 0px auto;padding: 0px;"][x_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" class="cs-ta-center" style="padding: 0px;"][x_image type="none" src="https://elementpaints.com/wp-content/uploads/2016/07/Element-db3236-transparent-130x27.png" alt="" link="false" href="#" title="" target="" info="none" info_place="top" info_trigger="hover" info_content="" class="man"][/x_column][x_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" class="cs-ta-center" style="padding: 0px;"][x_custom_headline level="h3" looks_like="h5" accent="false" class="man"]Rich and vivid acrylics that improve your painting.[/x_custom_headline][/x_column][x_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" class="cs-ta-center" style="padding: 0px;"][x_raw_content]<div class="footer-social"> <a href="https://www.facebook.com/ElementPaints" target="_blank"><img src="/wp-content/uploads/2016/05/facebook.png"></a> <a href="https://twitter.com/ElementPaints" target="_blank"><img src="/wp-content/uploads/2016/05/twitter.png"></a> <a href="https://instagram.com/ElementPaints/" target="_blank"><img src="/wp-content/uploads/2016/05/instagram.png"></a> <a href="https://pinterest.com/ElementPaints/" target="_blank"><img src="/wp-content/uploads/2016/05/pinterest.png"></a> <a href="https://plus.google.com/+ElementPaints" target="_blank"><img src="/wp-content/uploads/2016/05/google.png"></a> </div>[/x_raw_content][/x_column][/x_row][/x_section] [x_section]
Please add shortcode directly to wp-footer.php file. Instead of
<?php x_get_view( 'renew', 'cs-dump-footer-top-row' ); ?>
Add :
<?php echo do_shortcode('[x_section parallax="false" style="margin: 0px;padding: 0px;"][x_row inner_container="true" marginless_columns="false" class="cs-ta-center" style="margin: 0px auto;padding: 0px;"][x_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" class="cs-ta-center" style="padding: 0px;"][x_image type="none" src="https://elementpaints.com/wp-content/uploads/2016/07/Element-db3236-transparent-130x27.png" alt="" link="false" href="#" title="" target="" info="none" info_place="top" info_trigger="hover" info_content="" class="man"][/x_column][x_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" class="cs-ta-center" style="padding: 0px;"][x_custom_headline level="h3" looks_like="h5" accent="false" class="man"]Rich and vivid acrylics that improve your painting.[/x_custom_headline][/x_column][x_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/3" class="cs-ta-center" style="padding: 0px;"][x_raw_content]<div class="footer-social"><a href="https://www.facebook.com/ElementPaints" target="_blank"><img src="/wp-content/uploads/2016/05/facebook.png"></a><a href="https://twitter.com/ElementPaints" target="_blank"><img src="/wp-content/uploads/2016/05/twitter.png"></a><a href="https://instagram.com/ElementPaints/" target="_blank"><img src="/wp-content/uploads/2016/05/instagram.png"></a><a href="https://pinterest.com/ElementPaints/" target="_blank"><img src="/wp-content/uploads/2016/05/pinterest.png"></a><a href="https://plus.google.com/+ElementPaints" target="_blank"><img src="/wp-content/uploads/2016/05/google.png"></a></div>[/x_raw_content][/x_column][/x_row][/x_section] [x_section]'); ?>
Hope it helps.
July 19, 2016 at 4:41 am #1093197Thanks for the help 🙂
I have tested your code, and implemented as asked, but there is no change.
Also I’m trying to learn what went wrong, so that I can avoid it in the future. With that in mind can you please explain a few details for me:
1) Why was the shortcode changed from what the Cornerstone page generated?
2) How do I generate the correct shortcode next time (how did you generate this new shortcode)?
3) You asked me to remove <?php x_get_view( ‘renew’, ‘cs-dump-footer-top-row’ ); ?> from the wp-footer.php file and input the shortcode directly into that file instead of inserting it via the x_get_view hook. But what I want to achieve is setting up a custom View (as per your help document: https://community.theme.co/kb/customization-best-practices/) so that the shortcode gets pulled into wp-footer.php from my custom View file cs-dump-footer-top-row.php. Having my shortcode placed in a custom View is a much cleaner setup and something I would prefer (instead of directly inserting the shortcodes into the wp-footer.php). Can you please advise how to set it up in that manner?
Thanks again for all your help!
I have left all your changes on my site for you to inspect if needed, but as described above, I’m trying to implement a custom view file not insert the shortcode directly. So I can change back to my code configuration if you would prefer.
July 19, 2016 at 8:04 am #1093413Sorry!
It actually does work. My original code works fine. I just had the wrong footer area showing in customizer – I was showing widegst only – that is why I couldnt see it.
Everything works now 🙂
July 19, 2016 at 8:50 am #1093491Glad you were able to figure it out 🙂
-
AuthorPosts