topscorer
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: wp-cron.php running Postie and Subscribe2RESOLVED
Forum: Fixing WordPress
In reply to: wp-cron.php running Postie and Subscribe2Done it!
Because my wordpress is installed inside a .htaccess password protected folder I needed to enter the username and password into the command like this:-
wget –user=”user” –password=”password” http://members.lakesideinvestmentclub.com/wp-cron.php?doing_wp_cron
Now it works.
Thanks for your help!
Forum: Fixing WordPress
In reply to: wp-cron.php running Postie and Subscribe2More information, Dreamhost checked the logs for me and say that the cron job is executing with no errors. However Postie and Subscriber2 still are not working.
I decided to focus on Postie since Subscriber2 cannot work if their are no new post to digest.
I created a second cron job using instructions from here – http://postieplugin.com/forcing-an-email-check/ and entered the command wget http://members.lakesideinvestmentclub.com/?postie=get-mail set to run every 10 minutes.
I get the following error:
–2015-02-25 11:00:05– http://members.lakesideinvestmentclub.com/?postie=get-mail
Resolving members.lakesideinvestmentclub.com (members.lakesideinvestmentclub.com)… 173.236.190.75 Connecting to members.lakesideinvestmentclub.com (members.lakesideinvestmentclub.com)|173.236.190.75|:80… connected.
HTTP request sent, awaiting response… 401 Authorization Required Authorization failed.Any ideas what I need to do?
Forum: Fixing WordPress
In reply to: wp-cron.php running Postie and Subscribe2OK, so I made that change and have it set for 10 minute intervals.
With the way I originally had it I had enabled email notification for a short time to check it was actually running and got an email saying:
sh: http://members.lakesideinvestmentclub.com/wp-cron.php?doing_wp_cron: No such file or directory
Since changing the command to
wget -q -O – http://members.lakesideinvestmentclub.com/wp-cron.php?doing_wp_cronI have not received any email, implying that the command has not been executed?
Do you have any idea what the problem might be? Thanks
Forum: Fixing WordPress
In reply to: wp-cron.php running Postie and Subscribe2OK great, quite please that I almost got it right :-).
I’ll try that change and let you know how I get on.
Thank you Wayne.
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesHi, yes I put the file in the child theme and it’s activated.
That plugin is great by the way!
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesHi, yes I did. The template doesn’t seem to look at the English-header at all even though I called it in the code above.
Do I need to create the same folder structure in the Child theme and put the template in the folder instead of the root?
That plugin seems to work great based on a quick test I’ve done.
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesHi, yes I did that. The template and English-header are both in the Child Theme.
I want to figure this out, it’s interesting to me and I want to have a better understanding of the code so I appreciate all your help.
In the meantime someone has posted on the themes page about this plugin:-
http://themify.me/conditional-menus
It seems to do exactly what I want but I need to test it.
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesWell it seems that my English Template is not looking at my English Header so whatever I change in English Header is making no difference at the moment. In fact I can delete it and nothing happens.
I really don’t understand why. I can see and choose English Template in WordPress and the code I placed points it to English Header.
get_header( 'header-english' ); ?> <section id="container" class="one-column"> <div id="content" role="main"> <?php get_template_part( 'content/content', 'page'); ?> </div><!-- #content --> </section><!-- #container --> <?php get_footer(); ?>So until I can figure out how to get the English Template to use the English Header non of the code changing I’ve been trying in English Header is going to make any difference.
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesBy the way, I have posted on the theme forum but have had no response. It doesn’t seem to be very active: –
http://www.cryoutcreations.eu/forums/t/using-different-primary-menu-for-different-pages
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesHi
Been busy with other things today.
I like that idea. I think it would mean making a Spanish-footer.php that points to the primary menu instead of the footer menu as well as an English-header.php that uses the footer menu?
I’ve set my EnglishMenu to be the footer and I can now see the EnglishMenu on all my pages as the footer.
I’ve found the reference to the 3 menus you mention in /includes/theme-setup.php.
// This theme uses wp_nav_menu() in 3 locations. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'nirvana' ), 'top' => __( 'Top Navigation', 'nirvana' ), 'footer' => __( 'Footer Navigation', 'nirvana' ),/** * Create menus */ // TOP MENU function nirvana_top_menu() { if ( has_nav_menu( 'top' ) ) wp_nav_menu( array( 'container' => 'nav', 'container_class' => 'topmenu', 'theme_location' => 'top', 'depth' =>1 ) ); } add_action ('cryout_topbar_hook','nirvana_top_menu',15); // MAIN MENU function nirvana_main_menu() { /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?> <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'nirvana' ); ?>"><?php _e( 'Skip to content', 'nirvana' ); ?></a></div> <?php /* Main navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ wp_nav_menu( array( 'container_class' => 'menu', 'menu_id' =>'prime_nav', 'theme_location' => 'primary', 'link_before' => '<span>', 'link_after' => '</span>' ) ); } add_action ('cryout_access_hook','nirvana_main_menu'); // FOOTER MENU function nirvana_footer_menu() { if ( has_nav_menu( 'footer' ) ) wp_nav_menu( array( 'container' => 'nav', 'container_class' => 'footermenu', 'theme_location' => 'footer', 'depth' =>1 ) ); } add_action ('cryout_footer_hook','nirvana_footer_menu' , 10);I’ve found several references that I believe are related to navigation in header.php but nothing that seems specific to me.
Here:-
<div id="topbar" ><div id="topbar-inner"> <?php cryout_topbar_hook(); ?> </div></div>And here:-
</div><!-- #branding --> <a id="nav-toggle"><span> </span></a> <nav id="access" role="navigation"> <?php cryout_access_hook();?> </nav><!-- #access -->I’ve experimented with my header-English.php by trying to change different references to top to reference footer but haven’t got anything to work yet.
For example when I changed ‘cryout_topbar_hook or cryout_access_hook to cryout_footer_hook nothing happened.
What also worries me is that I also don’t seem to have broken anything lol. The different changes I’ve made don’t seem to have caused errors when viewing pages which makes me wonder whether my English template is even using the header-English.php.
If the English Template looks at header-English.php and doesn’t understand does it then go to header.php and follow that instead of causing an error?
I don’t really understand the code very well but I’m not sure the header is directly calling the menu. I think it might be calling another php file that is then calling the menu. Could that be?
So I’m still stuck. I bet this is something really simple once I figure it out. I’ll keep trying, if you can offer anymore tips or assistance I would greatly appreciate it.
Many thanks for everything you’ve done so far.
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesThanks
The functions.php file calls several other files in an ‘includes’ folder. One of those files is called theme-hooks.php and seems to contain several ‘cryout’ calls such as:
// Topbar function cryout_topbar_hook() { do_action('cryout_topbar_hook');In edit page for an English page I made a custom field called ‘MenuName’ and used the value ‘EnglishMenu’, which is the name of the menu I want to use on English language pages.
Is the answer as simple as changing ‘topbar’ in the above code to ‘MenuName’? Would it then use my MenuName value instead of looking for the topbar value?
I’m assuming the topbar field is calling the menu!
The full code for theme-hooks.php is:
<?php /* * Theme hooks * * @package nirvana * @subpackage Functions */ /** * HEADER.PHP HOOKS */ // Before wp_head hook function cryout_header_hook() { do_action('cryout_header_hook'); } // Meta hook function cryout_meta_hook() { do_action('cryout_meta_hook'); } // Before wrapper function cryout_body_hook() { do_action('cryout_body_hook'); } // Inside wrapper function cryout_wrapper_hook() { do_action('cryout_wrapper_hook'); } // Topbar function cryout_topbar_hook() { do_action('cryout_topbar_hook'); } // Before masthead function cryout_masthead_hook() { do_action('cryout_masthead_hook'); } // Inside branding function cryout_branding_hook() { do_action('cryout_branding_hook'); } // Inside header for widgets function cryout_header_widgets_hook() { do_action('cryout_header_widgets_hook'); } // Inside access function cryout_access_hook() { do_action('cryout_access_hook'); } // Inside main function cryout_main_hook() { do_action('cryout_main_hook'); } // Inside forbottom function cryout_forbottom_hook() { do_action('cryout_forbottom_hook'); } // Breadcrumbs function cryout_breadcrumbs_hook() { do_action('cryout_breadcrumbs_hook'); } /** * FOOTER.PHP HOOKS */ // Footer hook function cryout_footer_hook() { do_action('cryout_footer_hook'); } /** * COMMENTS.PHP HOOKS */ // Before comments hook function cryout_before_comments_hook() { do_action('cryout_before_comments_hook'); } // Actual comments hook function cryout_comments_hook() { do_action('cryout_comments_hook'); } // After comments hook function cryout_after_comments_hook() { do_action('cryout_after_comments_hook'); } // No comments hook function cryout_nocomments_hook() { do_action('cryout_nocomments_hook'); } /** * SIDEBAR.PHP HOOKS */ // No comments hook function cryout_before_primary_widgets_hook() { do_action('cryout_before_primary_widgets_hook'); } // No comments hook function cryout_after_primary_widgets_hook() { do_action('cryout_after_primary_widgets_hook'); } // No comments hook function cryout_before_secondary_widgets_hook() { do_action('cryout_before_secondary_widgets_hook'); } // No comments hook function cryout_after_secondary_widgets_hook() { do_action('cryout_after_secondary_widgets_hook'); } /** * LOOP.PHP HOOKS */ // Before each article hook function cryout_before_article_hook() { do_action('cryout_before_article_hook'); } // After each article hook function cryout_after_article_hook() { do_action('cryout_after_article_hook'); } // After each article title function cryout_post_title_hook() { do_action('cryout_post_title_hook'); } // After each post meta function cryout_post_meta_hook() { do_action('cryout_post_meta_hook'); } // Before the actual post content function cryout_post_before_content_hook() { do_action('cryout_post_before_content_hook'); } // After the actual post content function cryout_post_after_content_hook() { do_action('cryout_post_after_content_hook'); } // After the actual post content function cryout_post_footer_hook() { do_action('cryout_post_footer_hook'); } //Content hooks function cryout_before_content_hook() { do_action('cryout_before_content_hook'); } function cryout_after_content_hook() { do_action('cryout_after_content_hook'); } ?>Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesOK, progress.
I believe I now have an English template calling from header-English.php:-
<?php /** * Template Name: One column, english * * A custom page template without sidebar. * * The "Template Name:" bit above allows this to be selectable * from a dropdown menu on the edit page screen. * * @package Cryout Creations * @subpackage nirvana * @since nirvana 0.5 */ get_header( 'header-english' ); ?> <section id="container" class="one-column"> <div id="content" role="main"> <?php get_template_part( 'content/content', 'page'); ?> </div><!-- #content --> </section><!-- #container --> <?php get_footer(); ?>Now I need to figure out what to change in header-English.php so it looks at my English menu instead of the Spanish one.
Can anyone point me in the right direction please?
Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesI can now see my English template in page editing mode. I’ve selected it for one of my pages and it works.
I’ve created a header-English.php and I want to try and call that header instead of header.php for the English template.
I see the get_header () in the code and I thought changing it to get_header-english would work but it didn’t. Can anyone help me and tell me how to get this template to call from my new header file please?
get_header(); ?> <section id="container" class="one-column"> <div id="content" role="main"> <?php get_template_part( 'content/content', 'page'); ?> </div><!-- #content --> </section><!-- #container --> <?php get_footer(); ?>Forum: Themes and Templates
In reply to: [Nirvana] Different Primary Menus for Different PagesHi Radices
I have modified code before by pasting snippets I’ve found on forums. I just haven’t written code.
So for example I’ve already setup the child theme and created a new template file and header file by copying and renaming the existing template and header files.
I just need to figure out where the header call is in my new template and change it to the new header I made and then figure out what coding I need to change in the new header so that it looks at the English menu.
I have thought about just creating two websites like you suggest and I’ve done it that way before with other sites. But in this case I already have two sites, one for the main landing page and another for a password protected area so I would need a total of 4 websites to make it bilingual!
Since in this particular case I have several other people editing the website I think it’s going to be far too confusing for them having to login to 4 different WordPress installs!
Besides all that I’m interested in learning how to do it! It’s a challenge and I’m sure what I learn will be useful again in the future and will help me to better understand code for future, as yet unknown, challenges.
Is the topbar something to do with the primary menu?