Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

[SOLVED] New widget area after 1st excerpt


  #1  
Old Aug 13, 2014, 10:35 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Hi,

Is it doable to make a new widget area after the first excerpt in the center column and, if so, how do I do it?
I'm talking about the following site: www.elektroretailmagazine.nl

Cheers,
Tim
  #2  
Old Aug 13, 2014, 05:08 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
One way would be to edit index.php and put some code in the loop to check if it is a multi post page and if the post count is 2 and then execute the new widget code
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Aug 14, 2014, 02:29 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Goodmorning JD (at least, over here it's morning),

Thnx for the reply. 2 more questions: where can I see & learn what this code would look like and if I alter index.php, does this mean I'll have to do this after each theme update?
  #4  
Old Aug 14, 2014, 04:23 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
the code would be something like this
HTML Code:
	    <?php if ($bfa_ata_postcount == 2) { bfa_widget_area('name=middle widget area');} ?>
and yes you will have to update index.php after each update.

UPDATE: that line would go right after the line
HTML Code:
	<?php while (have_posts()) : the_post(); $bfa_ata_postcount++; ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Aug 15, 2014 at 12:31 PM.
  #5  
Old Aug 14, 2014, 04:46 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Thank you very much JD.

Would working with a child theme solve this problem? If so, I guess I'll have to dig into that.

Cheers,
Tim
  #6  
Old Aug 14, 2014, 04:57 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
not sure, you would have to try it out
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Aug 14, 2014 at 05:05 AM.
  #7  
Old Aug 14, 2014, 05:03 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Okay, thanks. I have some homework te do.

Cheers,
Tim
  #8  
Old Aug 14, 2014, 05:05 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
there is a widget area at the top of the center area now but it will only work before the first post (and it is a theme option)
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Aug 14, 2014, 05:15 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Yes, I know. But of course, that's too easy for me. I want it somewhere else, after the first (or second, or third...) excerpt.
  #10  
Old Aug 15, 2014, 09:57 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Tried inserting the code you gave me in functions.php, but that resulted in a syntax error. Either I placed it in the wrong place or there's something wrong with the code. Could you check to see if it's the latter, JD?
  #11  
Old Aug 15, 2014, 12:30 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
ummmm (warning: be prepared to give yourself a head slap) why don't you go back and read that post again about where I told you to put it
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #12  
Old Aug 15, 2014, 01:05 PM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Oops, sorry. Guess it's Friday....

  #13  
Old Aug 27, 2014, 08:14 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Did everything you said, Juggeldad, but the widget won't appear....
  #14  
Old Aug 27, 2014, 08:26 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what is the exact code you used and where did you put it?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #15  
Old Aug 27, 2014, 10:17 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
the code you gave me and the place you told me
  #16  
Old Aug 27, 2014, 10:59 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
if you go to the dashboard->appearances->widgets is the widget area showing up?

if not, attach a copy of your index.php to a reply
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #17  
Old Aug 28, 2014, 04:33 AM
timdevogel's Avatar
timdevogel
 
141 posts · May 2009
Hi JD,
Solved it. Just a matter of putting the code in the right place.
Thanks!

Bookmarks

Tags
center column, new widget area

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi How do I create a layout in the center area with a post then excerpt and thumbnai? FanaSu700 Center area post/pages 6 Feb 29, 2012 04:53 PM
[SOLVED] Images in header area and widget text area don't display 3.6.4 arthurmild New Versions, & Updating 4 Mar 28, 2011 08:56 PM
Positioning widget onto logo area creates extra spacing in the overall header area cab262 Header configuration & styling 1 May 20, 2010 02:14 PM
Tweetmeme widget does not show up when using Manual excerpt buzz628 Sidebars & Widgets 0 Jan 15, 2010 06:40 PM
Widget to sit underneath Excerpt? keeperleaguegm Excerpts, Read more, Pagination 0 Sep 8, 2009 01:46 PM


All times are GMT -6. The time now is 03:09 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.