Tagged: x
-
AuthorPosts
-
May 7, 2016 at 8:16 am #980120
5wanParticipantHi,
I want to add a footer to a single page only.
Footer to contain simple text widgets.Page in question:
http://www.duncanswan.me/books/How do I got about doing this?
May 7, 2016 at 8:16 am #980122
5wanParticipantThis reply has been marked as private.May 7, 2016 at 10:31 am #980217
ThaiModeratorHi There,
Please add the following code under functions.php file locates in your child theme:
add_action( 'x_after_view_global__content', 'x_print_after_content' ); function x_print_after_content(){ if(is_singular( 'page' )){ ?> <div id="x-section-footer" class="x-section" style="margin: 0px;padding: 45px 0px; background-color: transparent;"> <div class="x-container max width" style="margin: 0px auto;padding: 0px;"> <div class="x-column x-sm x-1-1" style="padding: 0px;"> <p>Input your quotation here. Also, you can cite your quotes if you would like.</p> </div> </div> </div> <?php } }Replace the text
Input your quotation here. Also, you can cite your quotes if you would like.with your texts.Hope it helps đ
May 7, 2016 at 10:32 am #980218
5wanParticipantIs it possible to replace the “Input your quotation here” with an image instead? or Shortcode?
May 7, 2016 at 12:19 pm #980281
ThaiModeratorYes, Of course:
add_action( 'x_after_view_global__content', 'x_print_after_content' ); function x_print_after_content(){ if(is_singular( 'page' )){ ?> <div id="x-section-footer" class="x-section" style="margin: 0px;padding: 45px 0px; background-color: transparent;"> <div class="x-container max width" style="margin: 0px auto;padding: 0px;"> <div class="x-column x-sm x-1-1" style="padding: 0px;"> <img src="http://placehold.it/650x250" /> </div> </div> </div> <?php } }Regards!
May 7, 2016 at 7:30 pm #980456
5wanParticipantHi, I couldn’t seem to get the above to work.
Have removed it from my functions.php again.Two questions:
– How does it restrict the footer to only be added to the “Books” page?
– And how can I specify it to insert widgets into the footer?That would enable me to manage the text or images in the form of widgets, instead of having to modify the Functions.php
May 7, 2016 at 7:33 pm #980460
5wanParticipantOn a side note, it seems to be adding the ‘footer’ directly below the pre-existing body of text, within the entry container.
Is it possible to have it display outside of the container instead?
ie. Appearing on the background image, in the same style as the side bar widgets?May 8, 2016 at 1:49 am #980769
Rue NelModeratorHello There,
The best and easiest recommendation I could give is this.
1] Please edit all your pages and change the page template. You can choose to use “Blank – Container | Header , No Footer” or “Blank – No Container | Header, No Footer”.
2] And if you want that in your “Books” page to have a footer, you can make use of the “Blank – Container | Header , Footer” or “Blank – No Container | Header, Footer” page template.
3] You can manage all the footer widgets in Appearance > Widgets.
This solution doesn’t involve any custom code needed in your functions.php file. Hope this helps.
May 8, 2016 at 5:10 am #980872
5wanParticipantproblem with that is then I lose my side bar.
Is there another solution?May 8, 2016 at 5:19 am #980878
5wanParticipantIdeally, I want the new ‘widget area’ to span the content area (ie. the large body of text), without overlapping / appearing under the sidebar.
So as my sidebar grows, it don’t impact the new widget area.
ie. On my page:
http://www.duncanswan.me/books/The new widget area should appear to the right of the subscribe button, but not in the container with all the text, but below it instead.
May 8, 2016 at 5:51 am #980895
ChristopherModeratorHi there,
Are you trying to make footer full width outside container, right?
Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!May 8, 2016 at 6:25 am #980924
5wanParticipantI’m fairly certain something similar can be achieved by modifying my child theme to include the below:
In Functions.php of child theme:
register_sidebar( array(
ânameâ => __( âHeader Widgetâ, âx child themeâ ),
âidâ => âheader-widgetâ,
âbefore_widgetâ => â<div id=â%1$sâ class=âwidget %2$sâ>â,
âafter_widgetâ => â</div>â,
âbefore_titleâ => â<h3 class=âwidget-titleâ>â,
âafter_titleâ => â</h3>â,
) );
?>In wp-header.php:
<?php if ( is_active_sidebar( âheader-widgetâ ) ) : ?>
<div><?php dynamic_sidebar( âheader-widgetâ ); ?></div>
<?php endif; ?>CSS:
/**********CSS FOR BELOW HEADER WIDGET*****/#main #widget_name {
background-color: #FFD75F;
padding: 2px;
margin-left: auto;
margin-right: auto;
}May 8, 2016 at 6:26 am #980925
5wanParticipantbut I cant locate wp-header.php in framework\views\
Currently I only have style and functions.php
What step have I missed?
ThanksMay 8, 2016 at 7:30 am #980960
ChristopherModeratorHi there,
wp-hearder.php is located under wp-content/themes/x/framework/views/Your STACK. Please copy this file and put it in the same path inside child theme (wp-content/themes/x-child/framework/views/Your STACK) to modify it.
Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-980120 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
