Forum Replies Created

Viewing 15 replies - 31 through 45 (of 48 total)
  • Thread Starter webnik

    (@noisedude)

    In case anyone else reads this – I managed to resolve the problem by editing the incorrect paths in the wp_options table in my database.

    Does anyone know if it’s possible to export the database in such a way that it edits these paths on the way out?

    Thread Starter webnik

    (@noisedude)

    Or is it perhaps something that I can fix in the options I pick when exporting the WP database using phpMyAdmin?

    Thread Starter webnik

    (@noisedude)

    OK, thanks. Can you give me any more detail on what I should ask them or suggestions for how to correct it?

    Thread Starter webnik

    (@noisedude)

    I will do. Only worry is getting conflicts between multiple plugins that fiddle with the login – I had that problem once before which is how I ended up back at wanting to customise the form manually.

    Thread Starter webnik

    (@noisedude)

    That’s great, thanks. Now that I’ve tried a few options out, I might stick the “generate a list only if there are child Pages (that designate the current page as a Parent)” code into the page.php file and let it take care of itself rather than select the new template for every single page.

    Useful exercise in learning how to make a new page template though! ??

    Thread Starter webnik

    (@noisedude)

    Here’s one. It seems to spot that I’ve put in a carriage return, but no number of ‘enters’ in the editor window will make it automatically make a new paragraph/line break.

    https://mrkeefe.co.uk/year-11-p2/electricity/electrical-circuits/

    Thread Starter webnik

    (@noisedude)

    Thanks for that, not really sure how to use it. I guess what I want to do is make a copy of my default page template and add in the code that displays a list of the child pages.

    Here’s the parent page template code from the Constructor theme – how do I pick out just the bits I need to put into my Mystique page?

    I want every other aspect of the page to look the same as my default Mystique pages.

    <?php
    /*
    Template Name: Parent Page
    */
    /**
     * @package WordPress
     * @subpackage Constructor
     */
    
    get_header(); ?>
    <div id="wrapper" class="box shadow opacity">
        <div id="container" class="container-sitemap">
            <div id="posts">
            <?php while (have_posts()) : the_post(); ?>
                <div <?php post_class(); ?> id="post-<?php the_ID() ?>">
                    <div class="title opacity box">
                        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'constructor'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
                    </div>
                    <div class="entry">
                        <?php the_content(__('Read the rest of this entry &raquo;', 'constructor')) ?>
                        <ul>
                            <?php wp_list_pages('title_li=&child_of='.$post->ID); ?>
                        </ul>
                        <?php wp_link_pages(array('before' => '<p class="pages"><strong>'.__('Pages', 'constructor').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
                    </div>
                    <div class="footer">
                        <div class="links right">
                        <?php if($post->post_parent) : $parent_link = get_permalink($post->post_parent); ?>
                        <a href="<?php echo $parent_link; ?>"><?php _e('Back to Parent Page', 'constructor');?></a> |
                        <?php endif; ?>
                        <?php the_date() ?> |
                        <?php the_tags(__('Tags', 'constructor') . ': ', ', ', '|'); ?>
                        <?php edit_post_link(__('Edit', 'constructor'), '', ' | '); ?>
                        <?php comments_popup_link(__('No Comments »', 'constructor'), __('1 Comment »', 'constructor'), __('% Comments »', 'constructor'), '', __('Comments Closed', 'constructor') ); ?>                    </div>
                        <div class="line clear"></div>
                    </div>
                </div>
            <?php endwhile; ?>
            </div>
    
        </div><!-- id='container' -->
        <?php get_constructor_sidebar(); ?>
    </div><!-- id='wrapper' -->
    <?php get_footer(); ?>
    Thread Starter webnik

    (@noisedude)

    Addendum – I resolved this with the plugin called ‘WP Block Admin’, which boots my subscriber account straight back to the front page of the site even if they enter the pgslearning.co.uk/art/wp-admin/ URL manually.

    Thread Starter webnik

    (@noisedude)

    Finally getting back to sorting this out now. I’m about to start putting some of this advice into practice and seeing what works.

    One thing though – the redirect in the URL at the moment is coming from the plugin I’m using which is called Authenticator.

    Can I modify the plugin OR make it a custom one OR (ideal option I think) remove the redirect instruction safely AND add the code from the previous post to my functions.php?

    The Authenticator plugin code is as follows … I can see the line that redirects (can I just take that whole line out??) but for the reasons stated before, it’s too easy to work around and I need something more robust.

    if (!class_exists('Authenticator')) {
    	class Authenticator {
    
    		function fb_authenticator_redirect() {
    			// Checks if a user is logged in, if not redirects them to the login page
    			if ( !is_user_logged_in() ) {
    				nocache_headers();
    				header("HTTP/1.1 302 Moved Temporarily");
    				header('Location: ' . get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
    				header("Status: 302 Moved Temporarily");
    				exit();
    			}
    		}
    
    		function Authenticator() {
    			global $pagenow;
    
    			if ('wp-login.php' != $pagenow && 'wp-register.php' != $pagenow)
    				add_action( 'template_redirect', array($this, 'fb_authenticator_redirect') );
    		}
    
    	}

    Thread Starter webnik

    (@noisedude)

    Yep!!

    Thread Starter webnik

    (@noisedude)

    Ahhhh, that beta looks like it does exactly what I need. Thank you very much.

    Thread Starter webnik

    (@noisedude)

    Brilliant, thank you. I can’t immediately figure out the URLs …. can I just enter the the web address of the homepage or do I enter something internal to tell it to go to the front of the site?

    Thread Starter webnik

    (@noisedude)

    To clarify – they must NOT be able to change the profile email address and I’d really rather they weren’t presented with site backend at all. There are no links in my sidebar or anywhere else on the pages, editors know the URL to log in manually, everyone else just needs to put in a password and then hit the homepage.

    No need to hack around for this actually in Constructor!

    Go into Customise and then Images, you can put an image in there and tell it where to place it, whether to repeat it etc.

    I just made a 1260 x 80 or something picture (the size of the lego bricks) with a transparent background and stuck a picture on the right hand end of that:

    https://mrkeefe.co.uk
    https://mrkeefe.co.uk/wp-content/themes/constructor/images/physicsheader.png

    HTH

    Thread Starter webnik

    (@noisedude)

    Brilliant, thanks.

    How would I change the default border to none, but keep that radiused border as an option (class?) for some images?

Viewing 15 replies - 31 through 45 (of 48 total)