graphicscove
Forum Replies Created
-
Forum: Hacks
In reply to: Custom Post Type and Premalink work styleHello,
I haven’t tried it but this plugin may be of use to you:
https://www.ads-software.com/plugins/custom-post-type-permalinks/Forum: Fixing WordPress
In reply to: Align these logosNo worries, glad I could be of assistance!
Forum: Fixing WordPress
In reply to: Align these logosTake off the float:left and try this:
img.sponsor-img { border: solid 1px blue; display: inline-block; vertical-align: middle; }
Forum: Hacks
In reply to: Add custom post type categoriesNo worries, glad I could help!
Forum: Fixing WordPress
In reply to: Align these logosThanks.
Looks like you need to change your display:block to display: inline-block as below:
img.sponsor-img { display: inline-block; }
There’s also this CSS rule overriding the above so delete this one or add an important to the display value above, otherwise it wont work.
footer.mh-footer img { display: block; }
Forum: Hacks
In reply to: Add custom post type categoriesYou will need to define a new taxonomy and call it something other than ‘Category’ then as it’s looking at the built in WordPress categories.
add_action( 'init', 'create_newcat_taxonomy' ); function create_newcat_taxonomy() { register_taxonomy( 'newcat', 'post', array( 'label' => 'New category', 'hierarchical' => true, ) ); }
Then in your taxonomy array add in:
'taxonomies' => array('newcat'),
Jetpack uses this to track visits to your site. It shouldn’t be anything to worry about.
Forum: Hacks
In reply to: Add custom post type categoriesWhere you have created your custom post type all you need to do is define categories as a taxonomy. Just add this into your custom post type function, it’s probably already in there with ‘tags’ in the array, just add ‘category’ instead.
‘
taxonomies' => array('category'),
Forum: Fixing WordPress
In reply to: Showing new posts count since last loginGetting the posts after a specific time can be achieved with 2 steps.
You need to store the last login time of the user.
Changing the query to pull the posts which are modified after the above login time.The below function will store the last login time of the user.
// Associating a function to login hook add_action ( 'wp_login', 'set_last_login' ); function set_last_login ( $login ) { $user = get_userdatabylogin ( $login ); // Setting the last login of the user update_usermeta ( $user->ID, 'last_login', date ( 'Y-m-d H:i:s' ) ); }
Then you need to collect the last login time of the logged in user and modify the query as below. Currently it shows a list of posts but you should easily be able to modify this to output a number by counting the number of times it goes through the loop.
<?php // Get current user object $current_user = wp_get_current_user(); // Get the last login time of the user $last_login_time = get_user_meta ( $current_user->ID, 'last_login', true ); // WP_Query with post modified time $the_query = new WP_Query( array( 'date_query' => array( 'column' => 'post_modified', 'after' => $last_login_time, ) ) ); ?> <?php if ( $the_query->have_posts() ) : ?> <?php // Start the Loop ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <?php // Show the output ?> <?php endwhile; ?> <?php endif; ?> <?php // Restore original Post Data wp_reset_postdata(); ?>
Forum: Fixing WordPress
In reply to: Align these logosHello,
It’s a bit difficult to actually see what the problem is as we can’t see the website but let’s see if I can help.
The first thing is the sometimes the white space between the <img> tags in the widget can cause the images not to line up correctly, but it looks like you’ve done it fine from the picture.
What CSS does the ‘sponsor-img’ class have applied to it? Are they float: left or display: inline-block; ?
Forum: Plugins
In reply to: [Tabify Edit Screen] Main editor layout issueThanks for the update Marko! I’m looking forward to the release.
Forum: Fixing WordPress
In reply to: Post information data on every post, visible to publicHello!
It makes things easier for people looking at your question if you provide a link to your website, that way people can see what your problem is rather than guessing, leading to a quicker solution.
Anyway as I can’t see your website this must be standard code which the theme puts out. I could offer a quick CSS solution if I knew the elements of your page. Better yet you could remove these from your themes template files. It usually varies from theme to theme but they can be removed from a file called ‘content.php’.
Let us know your site URL and we might be able to help further.
Forum: Fixing WordPress
In reply to: Menu disappearingHi Jim,
To get a better understanding of your setup:
What theme are you using?
What is your website URL?I’ve not heard of this before, is this a clean install of WordPress?
Have you tried applying this menu to locations other than ‘primary navigation’?Forum: Installing WordPress
In reply to: i want RSS like thisHello, what’s the URL of your site?
Forum: Fixing WordPress
In reply to: Website has disappeared – please help.Hello 4RFM,
Rule number 1, always disable the theme and plugin editors on live sites. Nothing good can come of using them.
The only way to fix your issue is to find the file you have been editing through your hosting control panels file manager or via FTP. Correct the mistake you made then save the fixed file. There’s no other way to get the front facing website back without access to the php files.
You must have done something else, the website is suffering from a code error. A ‘display none’ would still show items in the source but your site’s source is blank.
If you can’t get your code to work then copy a backed up version of that file to your server. If you don’t have any backups copy it from one of the default WordPress themes.
Let us know how you get on.