Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter Sutton74

    (@sutton74)

    Still loses the format :-\

    Thanks for your help with this issue BTW

    https://pastebin.com/P5vu48j8

    Thread Starter Sutton74

    (@sutton74)

    Seems to work, thanks.

    However, it messes up the formatting pretty bad…Any idea on how to make the format unchanged while removing and posts not under the category ‘Blog’?

    Old Way – https://i.imgur.com/G4LOn.png

    New Way – https://i.imgur.com/AkYhd.png

    Thread Starter Sutton74

    (@sutton74)

    Am I able to embed html into that, as it does have a while script.

    <?php
    				if (have_posts()){
    					/* Display navigation to next/previous posts when applicable */
    					if (theme_get_option('theme_top_single_navigation')) {
    						theme_page_navigation(
    							array(
    								'next_link' => theme_get_previous_post_link('&laquo; %link'),
    								'prev_link' => theme_get_next_post_link('%link &raquo;')
    							)
    						);
    					}
    
    					while (have_posts())
    					{
    						the_post();
    						get_template_part('content', 'single');
    						comments_template();
    					}
    
    					/* Display navigation to next/previous posts when applicable */
    					if (theme_get_option('theme_bottom_single_navigation')) {
    						theme_page_navigation(
    							array(
    								'next_link' => theme_get_previous_post_link('&laquo; %link'),
    								'prev_link' => theme_get_next_post_link('%link &raquo;')
    							)
    						);
    					}
    
    				} else {    
    
    					theme_404_content();
    
    				}
    			?>
    Thread Starter Sutton74

    (@sutton74)

    Here is the code in functions.php —

    if (!function_exists('theme_page_navigation')){
    	function theme_page_navigation($args = '') {
    		$args = wp_parse_args($args, array('wrap' => true, 'prev_link' => false, 'next_link' => false));
    		$prev_link = $args['prev_link'];
    		$next_link = $args['next_link'];
    		$wrap = $args['wrap'];
    		if (!$prev_link && !$next_link) {
    			if (function_exists('wp_page_numbers')) { // https://www.ads-software.com/extend/plugins/wp-page-numbers/
    				ob_start();
    				wp_page_numbers();
    				theme_post_wrapper(array('content' => ob_get_clean()));
    				return;
    			}
    			if (function_exists('wp_pagenavi')) { // https://www.ads-software.com/extend/plugins/wp-pagenavi/
    				ob_start();
    				wp_pagenavi();
    				theme_post_wrapper(array('content' => ob_get_clean()));
    				return;
    			}
    			//posts
    			$prev_link = get_previous_posts_link(__('Newer posts <span class="meta-nav">&rarr;</span>', THEME_NS));
    			$next_link = get_next_posts_link(__('<span class="meta-nav">&larr;</span> Older posts', THEME_NS));
    		}
    		$content = '';
    		if ($prev_link || $next_link) {
    
    			$content = <<<EOL
    	<div class="navigation">
    		<div class="alignleft">{$next_link}</div>
    		<div class="alignright">{$prev_link}</div>
    	 </div>

    And idea on what to change to make it category based? I’d appreciate any help you can give me.

    Thread Starter Sutton74

    (@sutton74)

    My navigation is set up as an array, so I’m unable to just add a True statement for the category choice.

    if (have_posts()){
    					/* Display navigation to next/previous posts when applicable */
    					if (theme_get_option('theme_top_single_navigation')) {
    						theme_page_navigation(
    							array(
    							    'next_link' => theme_get_previous_post_link('&laquo; %link'),
    								'prev_link' => theme_get_next_post_link('%link &raquo;')
    							)
    						);
    Thread Starter Sutton74

    (@sutton74)

    There is plenty of reason if you understood the functionality of my website. And while, I could narrow it down to two different themes, its unlikely I could have it all embraced under one theme.

    And I’d be unable to create them as pages due to the functionality of the site. I’d prefer to just have it so that my blog only pulls entries under the category ‘Blog’. I know its possible, as I have that functionality within https://zsuttonphoto.com/Blog/. I’m hoping someone here would be able to provide me with that single line of code that would make that its standard function.

    Thread Starter Sutton74

    (@sutton74)

    And the general idea is to have the previous and next links on the top and bottom of individual posts, but making sure its only pulling entries from the category ‘Blog’

    Thread Starter Sutton74

    (@sutton74)

    I assure you my website is running on three different themes. I designed them, afterall.

    But by setting them to private, aren’t I making it so no one can view them but me? The ultimate goal is to make proof galleries, that clients will be able to direct link to and select photos they’d like to have edited.

    Thread Starter Sutton74

    (@sutton74)

    Its worth noting that my individual entries are on a separate theme, so we can just hard wire it into the code without any issues elsewhere

Viewing 9 replies - 16 through 24 (of 24 total)