WordPress.org

Forums

Frontier
[resolved] lock widget for multisite (4 posts)

  1. sakicmilan
    Member
    Posted 10 months ago #

    hello i use theme for my betly.info multisite network, i allow users to create blogs on my network.. for my ads i use some plugins but it show my ads in post, i want to show my ads in sidebar and to disable options to blog admins to remove that ad space.
    for all new blogs i use default blog theme http://betlyblogtheme.betly.info/ i can customise this blog and every new blog have same design. how to add that ad in sidebar but not widget because if i lock access to widgets admins cant add all rest widgets, i want to that ad appear on first position and all rest widgets admins can change.

  2. ronangelo
    Member
    Theme Author

    Posted 10 months ago #

    I don't really have experience with multisites but if you just want to place your ads on the sidebar without it appearing on the widgets page then you could hardcode the ad on the sidebar template.

    Example: For the right sidebar.

    – Copy sidebar-right.php to your child-theme then open it.
    – Find this line: <div id="widgets-wrap-sidebar-right">
    – Add your ad codes immediately below it so that the ads appear first.
    – Your added code would look something like this:

    <div class="widget-sidebar frontier-widget" >
       Your ad code here
    </div>
  3. sakicmilan
    Member
    Posted 10 months ago #

    Hi ronangelo, this was very helpfull, it works. but now i have one more question, if i want to place widget there, what to do? widget shortcode dont work..

  4. ronangelo
    Member
    Theme Author

    Posted 10 months ago #

    Here's an example for the shortcode [contact-form-1]

    <div class="widget-sidebar frontier-widget" >
       <?php echo do_shortcode('[contact-form-1]'); ?>
    </div>

Reply

You must log in to post.

About this Theme

About this Topic